[Lldb-commits] [lldb] r270363 - A better fix of incorrectly used locking in HistoryThread and HistoryUnwind.

Kuba Brecka via lldb-commits lldb-commits at lists.llvm.org
Sun May 22 07:19:13 PDT 2016


Author: kuba.brecka
Date: Sun May 22 09:19:11 2016
New Revision: 270363

URL: http://llvm.org/viewvc/llvm-project?rev=270363&view=rev
Log:
A better fix of incorrectly used locking in HistoryThread and HistoryUnwind.


Modified:
    lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp
    lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp?rev=270363&r1=270362&r2=270363&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp Sun May 22 09:19:11 2016
@@ -76,7 +76,7 @@ HistoryThread::GetStackFrameList ()
 {
     // FIXME do not throw away the lock after we acquire it..
     std::unique_lock<std::mutex> lock(m_framelist_mutex);
-    lock.release();
+    lock.unlock();
     if (m_framelist.get() == NULL)
     {
         m_framelist.reset (new StackFrameList (*this, StackFrameListSP(), true));

Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp?rev=270363&r1=270362&r2=270363&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Sun May 22 09:19:11 2016
@@ -66,7 +66,7 @@ HistoryUnwind::DoGetFrameInfoAtIndex (ui
 {
     // FIXME do not throw away the lock after we acquire it..
     std::unique_lock<std::recursive_mutex> guard(m_unwind_mutex);
-    guard.release();
+    guard.unlock();
     if (frame_idx < m_pcs.size())
     {
         cfa = frame_idx;




More information about the lldb-commits mailing list