diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-25 23:03:29 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-25 23:03:29 +0000 |
| commit | 791e65dcfb55b4fb2aa02e9d0e58a0896e8dec09 (patch) | |
| tree | 09e0cde8ca6bc67bde102aeea9cc173d6a2ddd5f /compiler-rt/lib/tsan/rtl/tsan_rtl.cc | |
| parent | 8d27910d7d72bf315e589e78affc29466e45cde5 (diff) | |
| download | bcm5719-llvm-791e65dcfb55b4fb2aa02e9d0e58a0896e8dec09.tar.gz bcm5719-llvm-791e65dcfb55b4fb2aa02e9d0e58a0896e8dec09.zip | |
Overhaul the symbolizer interface.
This moves away from creating the symbolizer object and initializing the
external symbolizer as separate steps. Those steps now always take place
together.
Sanitizers with a legacy requirement to specify their own symbolizer path
should use InitSymbolizer to initialize the symbolizer with the desired
path, and GetSymbolizer to access the symbolizer. Sanitizers with no
such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for
initialization.
The symbolizer interface has been made thread-safe (as far as I can
tell) by protecting its member functions with mutexes.
Finally, the symbolizer interface no longer relies on weak externals, the
introduction of which was probably a mistake on my part.
Differential Revision: http://llvm-reviews.chandlerc.com/D1985
llvm-svn: 193448
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_rtl.cc')
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_rtl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc index 22cf3cfc853..fc2aa767b5e 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc @@ -238,10 +238,10 @@ void Initialize(ThreadState *thr) { InitializeLibIgnore(); // Initialize external symbolizer before internal threads are started. const char *external_symbolizer = flags()->external_symbolizer_path; - bool symbolizer_started = - getSymbolizer()->InitializeExternal(external_symbolizer); + bool external_symbolizer_started = + Symbolizer::Init(external_symbolizer)->IsExternalAvailable(); if (external_symbolizer != 0 && external_symbolizer[0] != '\0' && - !symbolizer_started) { + !external_symbolizer_started) { Printf("Failed to start external symbolizer: '%s'\n", external_symbolizer); Die(); |

