summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2015-07-29 00:40:36 +0000
committerJim Ingham <jingham@apple.com>2015-07-29 00:40:36 +0000
commitff244c1d9754b0632401a2bd36612afb7392cf44 (patch)
tree2803a1d2723fc5020a6535a467dbb1e1226b7174 /lldb
parent8039dae26d4f0523c19d3f17a8b19faa7c9d5141 (diff)
downloadbcm5719-llvm-ff244c1d9754b0632401a2bd36612afb7392cf44.tar.gz
bcm5719-llvm-ff244c1d9754b0632401a2bd36612afb7392cf44.zip
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> llvm-svn: 243507
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Breakpoint/BreakpointSite.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Breakpoint/BreakpointSite.cpp b/lldb/source/Breakpoint/BreakpointSite.cpp
index e9ce812e773..95b67b03c7b 100644
--- a/lldb/source/Breakpoint/BreakpointSite.cpp
+++ b/lldb/source/Breakpoint/BreakpointSite.cpp
@@ -205,6 +205,7 @@ BreakpointSite::ValidForThisThread (Thread *thread)
void
BreakpointSite::BumpHitCounts()
{
+ Mutex::Locker locker(m_owners_mutex);
for (BreakpointLocationSP loc_sp : m_owners.BreakpointLocations())
{
loc_sp->BumpHitCount();
OpenPOWER on IntegriCloud