From ac358da5899e06fa23f0e561c2df080b4a331865 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 28 Mar 2013 18:33:53 +0000 Subject: 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. llvm-svn: 178257 --- lldb/source/Target/ThreadList.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Target/ThreadList.cpp') diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp index 26692934c90..10c8e79c732 100644 --- a/lldb/source/Target/ThreadList.cpp +++ b/lldb/source/Target/ThreadList.cpp @@ -60,6 +60,10 @@ ThreadList::operator = (const ThreadList& rhs) 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(); } -- cgit v1.2.3