diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-03-28 18:33:53 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-03-28 18:33:53 +0000 |
| commit | ac358da5899e06fa23f0e561c2df080b4a331865 (patch) | |
| tree | a88b1e3c61f6d087e1ee1d6e6c7d0b561d838279 /lldb/source/Target/ThreadList.cpp | |
| parent | fb1ce5fa258b4fb54c7f3b0ae5ab38382930e403 (diff) | |
| download | bcm5719-llvm-ac358da5899e06fa23f0e561c2df080b4a331865.tar.gz bcm5719-llvm-ac358da5899e06fa23f0e561c2df080b4a331865.zip | |
<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.
llvm-svn: 178257
Diffstat (limited to 'lldb/source/Target/ThreadList.cpp')
| -rw-r--r-- | lldb/source/Target/ThreadList.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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(); } |

