[Lldb-commits] [lldb] r209485 - Make sure SectionLoadHistory::GetCurrentSectionLoadList () is thread safe.

Greg Clayton gclayton at apple.com
Thu May 22 16:54:17 PDT 2014


Author: gclayton
Date: Thu May 22 18:54:17 2014
New Revision: 209485

URL: http://llvm.org/viewvc/llvm-project?rev=209485&view=rev
Log:
Make sure SectionLoadHistory::GetCurrentSectionLoadList () is thread safe.

<rdar://problem/15818525>


Modified:
    lldb/trunk/source/Target/SectionLoadHistory.cpp

Modified: lldb/trunk/source/Target/SectionLoadHistory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/SectionLoadHistory.cpp?rev=209485&r1=209484&r2=209485&view=diff
==============================================================================
--- lldb/trunk/source/Target/SectionLoadHistory.cpp (original)
+++ lldb/trunk/source/Target/SectionLoadHistory.cpp Thu May 22 18:54:17 2014
@@ -108,6 +108,7 @@ SectionLoadList &
 SectionLoadHistory::GetCurrentSectionLoadList ()
 {
     const bool read_only = true;
+    Mutex::Locker locker(m_mutex);
     SectionLoadList *section_load_list = GetSectionLoadListForStopID (eStopIDNow, read_only);
     assert(section_load_list != NULL);
     return *section_load_list;





More information about the lldb-commits mailing list