[Lldb-commits] [lldb] r178257 - <rdar://problem/13527167>

Greg Clayton gclayton at apple.com
Thu Mar 28 11:33:54 PDT 2013


Author: gclayton
Date: Thu Mar 28 13:33:53 2013
New Revision: 178257

URL: http://llvm.org/viewvc/llvm-project?rev=178257&view=rev
Log:
<rdar://problem/13527167>

Partial fix for the above radar.

Call ThreadList::Clear() in the ThreadList destructor so if any other threads currently have the thread list mutex, we won't destroy the list for them while they are using it. ThreadList::Clear() takes the mutex and clears the thread list contents.


Modified:
    lldb/trunk/source/Target/ThreadList.cpp

Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=178257&r1=178256&r2=178257&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Thu Mar 28 13:33:53 2013
@@ -60,6 +60,10 @@ ThreadList::operator = (const ThreadList
 
 ThreadList::~ThreadList()
 {
+    // Clear the thread list. Clear will take the mutex lock
+    // which will ensure that if anyone is using the list
+    // they won't get it removed while using it.
+    Clear();
 }
 
 





More information about the lldb-commits mailing list