projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8039dae
)
Lock the owners mutex in the BreakpointSite before updating the hit
author
Jim Ingham
<jingham@apple.com>
Wed, 29 Jul 2015 00:40:36 +0000
(
00:40
+0000)
committer
Jim Ingham
<jingham@apple.com>
Wed, 29 Jul 2015 00:40:36 +0000
(
00:40
+0000)
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
lldb/source/Breakpoint/BreakpointSite.cpp
patch
|
blob
|
history
diff --git
a/lldb/source/Breakpoint/BreakpointSite.cpp
b/lldb/source/Breakpoint/BreakpointSite.cpp
index
e9ce812
..
95b67b0
100644
(file)
--- 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();