[Lldb-commits] [lldb] r178262 - Be sure to take the mutex when the destructor is called in case other threads are using these lists and those other threads have the mutex locked.
Greg Clayton
gclayton at apple.com
Thu Mar 28 11:41:45 PDT 2013
Author: gclayton
Date: Thu Mar 28 13:41:44 2013
New Revision: 178262
URL: http://llvm.org/viewvc/llvm-project?rev=178262&view=rev
Log:
Be sure to take the mutex when the destructor is called in case other threads are using these lists and those other threads have the mutex locked.
Modified:
lldb/trunk/include/lldb/Target/SectionLoadList.h
lldb/trunk/source/Target/StackFrameList.cpp
Modified: lldb/trunk/include/lldb/Target/SectionLoadList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/SectionLoadList.h?rev=178262&r1=178261&r2=178262&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/SectionLoadList.h (original)
+++ lldb/trunk/include/lldb/Target/SectionLoadList.h Thu Mar 28 13:41:44 2013
@@ -38,6 +38,9 @@ public:
~SectionLoadList()
{
+ // Call clear since this takes a lock and clears the section load list
+ // in case another thread is currently using this section load list
+ Clear();
}
bool
Modified: lldb/trunk/source/Target/StackFrameList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrameList.cpp?rev=178262&r1=178261&r2=178262&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrameList.cpp (original)
+++ lldb/trunk/source/Target/StackFrameList.cpp Thu Mar 28 13:41:44 2013
@@ -65,6 +65,9 @@ StackFrameList::StackFrameList
//----------------------------------------------------------------------
StackFrameList::~StackFrameList()
{
+ // Call clear since this takes a lock and clears the stack frame list
+ // in case another thread is currently using this stack frame list
+ Clear();
}
void
More information about the lldb-commits
mailing list