summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-05-22 20:13:22 +0000
committerGreg Clayton <gclayton@apple.com>2013-05-22 20:13:22 +0000
commit217b28baeedf46d33a99613e99d23007a9666da1 (patch)
tree03a4086d159c11488fcea0808e88bf014d31f10a /lldb/source/Core/Module.cpp
parentf88571e027eaaf08943aa4bd82f34026294f0e8b (diff)
downloadbcm5719-llvm-217b28baeedf46d33a99613e99d23007a9666da1.tar.gz
bcm5719-llvm-217b28baeedf46d33a99613e99d23007a9666da1.zip
<rdar://problem/13880690>
Lock the lldb_private::Module mutex while tearing down the module to make sure we don't get clients accessing the contents on a module as it is going away. llvm-svn: 182511
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index e234a704148..0967ef7100d 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -218,6 +218,9 @@ Module::Module(const FileSpec& file_spec,
Module::~Module()
{
+ // Lock our module down while we tear everything down to make sure
+ // we don't get any access to the module while it is being destroyed
+ Mutex::Locker locker (m_mutex);
// Scope for locker below...
{
Mutex::Locker locker (GetAllocationModuleCollectionMutex());
OpenPOWER on IntegriCloud