[PATCH] Overhaul the symbolizer interface.
Peter Collingbourne
peter at pcc.me.uk
Sun Oct 20 19:49:29 PDT 2013
Hi samsonov,
This moves away from creating the symbolizer object and initializing the
external symbolizer as separate steps. Those steps now always take place
together.
In true xkcd style, there is now one more way to specify the path to the
symbolizer, which is to set the LLVM_SYMBOLIZER_PATH environment variable.
This may not actually be needed now that we search PATH.
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 SymbolizeCode and SymbolizeData with mutexes.
Finally, the symbolizer interface no longer relies on weak externals, the
introduction of which was probably a mistake on my part.
http://llvm-reviews.chandlerc.com/D1985
Files:
lib/asan/CMakeLists.txt
lib/asan/asan_report.cc
lib/asan/asan_rtl.cc
lib/lsan/lsan.cc
lib/lsan/lsan_common.cc
lib/msan/msan.cc
lib/msan/msan_report.cc
lib/sanitizer_common/CMakeLists.txt
lib/sanitizer_common/sanitizer_linux.cc
lib/sanitizer_common/sanitizer_stacktrace.cc
lib/sanitizer_common/sanitizer_symbolizer.cc
lib/sanitizer_common/sanitizer_symbolizer.h
lib/sanitizer_common/sanitizer_symbolizer_internal.h
lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc
lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
lib/sanitizer_common/sanitizer_symbolizer_win.cc
lib/tsan/rtl/tsan_rtl.cc
lib/tsan/rtl/tsan_symbolize.cc
lib/ubsan/lit_tests/CMakeLists.txt
lib/ubsan/lit_tests/TypeCheck/Function/function.cpp
lib/ubsan/lit_tests/lit.cfg
lib/ubsan/ubsan_diag.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1985.1.patch
Type: text/x-patch
Size: 22451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131020/5f449384/attachment.bin>
More information about the llvm-commits
mailing list