llvm-project/lldb
Jim Ingham 1432b9780b Copy the breakpoint site owner's collection so we can drop
the collection lock before we iterate over the owners calling ShouldStop.

BreakpointSite::ShouldStop can do a lot of work, and might by chance hit the same breakpoint
site again on another thread.  So instead of holding the site's owners lock
while iterating over them calling ShouldStop, I make a local copy of the list, drop the lock 
and then iterate over the copy calling BreakpointLocation::ShouldStop.

It's actually quite difficult to make this cause problems because usually all the
action happens on the private state thread, and the lock is recursive.

I have a report where some code hit the ASAN error breakpoint, went to 
compile the ASAN error gathering expression, in the course of compiling
that we went to fetch the ObjC runtime data, but the state of the program
was such that the ObjC runtime grubbing function triggered an ASAN error and 
we were executing that function on another thread.  

I couldn't figure out a way to reproduce that situation in a test.  But this is an 
NFC change anyway, it just makes the locking strategy more narrowly focused.

<rdar://problem/49074093>

llvm-svn: 357141
2019-03-28 01:51:33 +00:00
..
cmake [CMake] Set LLVM_DEFAULT_EXTERNAL_LIT in standalone build correctly on windows 2019-03-18 21:32:31 +00:00
docs Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
examples python 2/3 compat: commands vs subprocess 2019-03-26 14:46:15 +00:00
include/lldb Copy the breakpoint site owner's collection so we can drop 2019-03-28 01:51:33 +00:00
lit minidump: Add ability to attach (breakpad) symbol files to placeholder modules 2019-03-27 10:54:10 +00:00
lldb.xcodeproj [Platform] Remove Kalimba Platform 2019-03-27 16:23:50 +00:00
lldb.xcworkspace Remove accidentally commited file in xcshareddata 2019-02-05 23:35:01 +00:00
packages/Python/lldbsuite [Platform] Remove Kalimba Platform 2019-03-27 16:23:50 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts python 2/3 compat: commands vs subprocess 2019-03-26 14:46:15 +00:00
source Copy the breakpoint site owner's collection so we can drop 2019-03-28 01:51:33 +00:00
test [CMake] Make lldb-test-deps a dependency of check-lldb 2019-02-13 20:51:13 +00:00
third_party/Python/module [lldb/thirdparty] Remove unneeded files, asked by Jonas. 2019-03-12 20:41:36 +00:00
tools [Platform] Remove Kalimba Platform 2019-03-27 16:23:50 +00:00
unittests [ExpressionParser] Add swift-lldb case for finding clang resource dir 2019-03-26 21:00:42 +00:00
utils Python 2/3 compat: StringIO 2019-03-25 15:23:34 +00:00
www Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
.arcconfig
.clang-format
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt Add lldb-vscode as a dependency of lldb tests. 2019-03-26 18:36:44 +00:00
CODE_OWNERS.txt Fix/unify the spelling of Objective-C. 2018-06-13 16:21:24 +00:00
INSTALL.txt
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py