loladiro created this revision.
loladiro added reviewers: clayborg, jingham.
loladiro added a subscriber: lldb-commits.
loladiro set the repository for this revision to rL LLVM.

This function reads m_frames, so it needs to lock the mutex like all other 
function that access m_frames. Found using AddressSanitizer.

Repository:
  rL LLVM

http://reviews.llvm.org/D13638

Files:
  source/Target/StackFrameList.cpp

Index: source/Target/StackFrameList.cpp
===================================================================
--- source/Target/StackFrameList.cpp
+++ source/Target/StackFrameList.cpp
@@ -105,6 +105,8 @@
 void
 StackFrameList::ResetCurrentInlinedDepth ()
 {
+    Mutex::Locker locker (m_mutex);
+
     if (m_show_inlined_frames)
     {        
         GetFramesUpTo(0);


Index: source/Target/StackFrameList.cpp
===================================================================
--- source/Target/StackFrameList.cpp
+++ source/Target/StackFrameList.cpp
@@ -105,6 +105,8 @@
 void
 StackFrameList::ResetCurrentInlinedDepth ()
 {
+    Mutex::Locker locker (m_mutex);
+
     if (m_show_inlined_frames)
     {        
         GetFramesUpTo(0);
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to