[Sanitizer] Add Symbolizer::AddHooks() and use it in TSan and MSan.
commit66d91e3356a0c4d7aff3beaaaff3e87bbaec805c
authorAlexey Samsonov <samsonov@google.com>
Thu, 31 Oct 2013 21:44:07 +0000 (31 21:44 +0000)
committerAlexey Samsonov <samsonov@google.com>
Thu, 31 Oct 2013 21:44:07 +0000 (31 21:44 +0000)
treef8c46cf4e4982459fff87bc1d2e3f3e4b3c5c0ce
parentb8a141f3783d796eabf45fabff82f3e08244e338
[Sanitizer] Add Symbolizer::AddHooks() and use it in TSan and MSan.

Summary:
TSan and MSan need to know if interceptor was called by the
user code or by the symbolizer and use pre- and post-symbolization hooks
for that. Make Symbolizer class responsible for calling these hooks instead.
This would ensure the hooks are only called when necessary (during
in-process symbolization, they are not needed for out-of-process) and
save specific sanitizers from tracing all places in the code where symbolization
will be performed.

Reviewers: eugenis, dvyukov

Reviewed By: eugenis

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2067

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193807 91177308-0d34-0410-b5e6-96231b3b80d8
lib/msan/msan.cc
lib/msan/msan_report.cc
lib/sanitizer_common/sanitizer_symbolizer.cc
lib/sanitizer_common/sanitizer_symbolizer.h
lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
lib/tsan/rtl/tsan_rtl.cc
lib/tsan/rtl/tsan_symbolize.cc
lib/tsan/rtl/tsan_symbolize.h