llvm-capstone/lldb
Pavel Labath 8ac0bc9832 DWARFContext: Make loading of sections thread-safe
Summary:
SymbolFileDWARF used to load debug sections in a thread-safe manner.
When we moved to DWARFContext, we dropped the thread-safe part, because
we thought it was not necessary.

It turns out this was only mostly correct.

The "mostly" part is there because this is a problem only if we use the
manual index, as that is the only source of intra-module paralelism.
Also, this only seems to occur for extremely simple files (like the ones
I've been creating for tests lately), where we've managed to start
indexing before loading the debug_str section. Then, two threads start
to load the section simultaneously and produce wrong results.

On more complex files, something seems to be loading the debug_str section
before we start indexing, as I haven't been able to reproduce this
there, but I have not investigated what it is.

I've tried to come up with a test for this, but I haven't been able to
reproduce the problem reliably. Still, while doing so, I created a way
to generate many compile units on demand. Given that most of our tests
work with only one or two compile units, it seems like this could be
useful anyway.

Reviewers: aprantl, JDevlieghere, clayborg

Subscribers: arphaman, lldb-commits

Differential Revision: https://reviews.llvm.org/D62316

llvm-svn: 361602
2019-05-24 08:04:03 +00:00
..
cmake [CMake] Add first CMake cache files 2019-05-17 19:19:41 +00:00
docs Update list of supported architectures. 2019-05-17 17:05:23 +00:00
examples [crashlog] Use loads() instead of readPlistFromString() for python 3. 2019-05-18 01:57:12 +00:00
include/lldb [Utility] Small improvements to the Broadcaster class (NFC) 2019-05-24 04:41:47 +00:00
lit DWARFContext: Make loading of sections thread-safe 2019-05-24 08:04:03 +00:00
lldb.xcodeproj Ack, added DWARFTypeUnit to the wrong target... 2019-05-23 00:12:45 +00:00
lldb.xcworkspace Remove accidentally commited file in xcshareddata 2019-02-05 23:35:01 +00:00
packages/Python/lldbsuite [Test] Fix conflicting test names. 2019-05-21 20:55:00 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts Make SBDebugger.RunCommandInterpreter callable from Python. 2019-05-15 00:08:55 +00:00
source DWARFContext: Make loading of sections thread-safe 2019-05-24 08:04:03 +00:00
test [CMake] Fix subtle CMake bug 2019-04-29 19:44:43 +00:00
third_party/Python/module [lldb/thirdparty] Remove unneeded files, asked by Jonas. 2019-03-12 20:41:36 +00:00
tools Fix integer literals which are cast to bool 2019-05-24 00:44:33 +00:00
unittests [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
utils [lldb] [lit] Add tests for reading ZMM registers (AVX512) 2019-04-29 11:38:10 +00:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt Added a dot at the end of comment 2019-05-22 13:23:15 +00:00
CODE_OWNERS.txt Fix/unify the spelling of Objective-C. 2018-06-13 16:21:24 +00:00
INSTALL.txt Fix build URL in new LLDB website 2019-05-01 09:55:00 +00:00
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