compnerd marked 2 inline comments as done.

================
Comment at: source/Interpreter/CommandObject.cpp:339
@@ -338,3 +338,3 @@
     m_exe_ctx.Clear();
-    m_api_locker.Unlock();
+    m_api_locker.unlock();
 }
----------------
zturner wrote:
> ```
> if (m_api_locker)
>     m_api_locker.unlock();
> ```
> 
> Otherwise this is undefined behavior.  Also make sure you do this check 
> anywhere else in the patch where you do manual unlocking / locking like this.
Yeah, this was the only place where the lock was unlocked and there wasn't a 
comment indicating that the assumption was that the lock will be held.  A few 
places where there were unlocks were early releases of the unique_lock.  A 
couple of places indicated that the lock must have been acquired prior to the 
destructor running.


Repository:
  rL LLVM

http://reviews.llvm.org/D20351



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to