[Lldb-commits] [lldb] r211043 - Don't allow two threads to create/use the section list before it has been fully populated.

Greg Clayton gclayton at apple.com
Mon Jun 16 12:44:25 PDT 2014


Author: gclayton
Date: Mon Jun 16 14:44:24 2014
New Revision: 211043

URL: http://llvm.org/viewvc/llvm-project?rev=211043&view=rev
Log:
Don't allow two threads to create/use the section list before it has been fully populated.

<rdar://problem/16937203>


Modified:
    lldb/trunk/source/Symbol/ObjectFile.cpp

Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=211043&r1=211042&r2=211043&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Mon Jun 16 14:44:24 2014
@@ -605,7 +605,10 @@ ObjectFile::GetSectionList()
     {
         ModuleSP module_sp(GetModule());
         if (module_sp)
+        {
+            lldb_private::Mutex::Locker locker(module_sp->GetMutex());
             CreateSections(*module_sp->GetUnifiedSectionList());
+        }
     }
     return m_sections_ap.get();
 }





More information about the lldb-commits mailing list