[Lldb-commits] [lldb] r243507 - Lock the owners mutex in the BreakpointSite before updating the hit
Jim Ingham
jingham at apple.com
Tue Jul 28 17:40:36 PDT 2015
Author: jingham
Date: Tue Jul 28 19:40:36 2015
New Revision: 243507
URL: http://llvm.org/viewvc/llvm-project?rev=243507&view=rev
Log:
Lock the owners mutex in the BreakpointSite before updating the hit
counts. If you delete a breakpoint belonging to a site just as you are
processing a hit on that site, you could cause the BreakpointSite loop to
access a now deleted location.
<rdar://problem/19310323>
Modified:
lldb/trunk/source/Breakpoint/BreakpointSite.cpp
Modified: lldb/trunk/source/Breakpoint/BreakpointSite.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointSite.cpp?rev=243507&r1=243506&r2=243507&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointSite.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointSite.cpp Tue Jul 28 19:40:36 2015
@@ -205,6 +205,7 @@ BreakpointSite::ValidForThisThread (Thre
void
BreakpointSite::BumpHitCounts()
{
+ Mutex::Locker locker(m_owners_mutex);
for (BreakpointLocationSP loc_sp : m_owners.BreakpointLocations())
{
loc_sp->BumpHitCount();
More information about the lldb-commits
mailing list