[Lldb-commits] [lldb] r182511 - <rdar://problem/13880690>

Greg Clayton gclayton at apple.com
Wed May 22 13:13:23 PDT 2013

Author: gclayton
Date: Wed May 22 15:13:22 2013
New Revision: 182511

URL: http://llvm.org/viewvc/llvm-project?rev=182511&view=rev

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.


Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=182511&r1=182510&r2=182511&view=diff
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Wed May 22 15:13:22 2013
@@ -218,6 +218,9 @@ Module::Module(const FileSpec& file_spec
+    // 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());

More information about the lldb-commits mailing list