summaryrefslogtreecommitdiff
path: root/lib/msan/msan_report.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-10-31 21:44:07 +0000
committerAlexey Samsonov <samsonov@google.com>2013-10-31 21:44:07 +0000
commit66d91e3356a0c4d7aff3beaaaff3e87bbaec805c (patch)
treef8c46cf4e4982459fff87bc1d2e3f3e4b3c5c0ce /lib/msan/msan_report.cc
parentb8a141f3783d796eabf45fabff82f3e08244e338 (diff)
[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
Diffstat (limited to 'lib/msan/msan_report.cc')
-rw-r--r--lib/msan/msan_report.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/msan/msan_report.cc b/lib/msan/msan_report.cc
index a629304e6..bb591ebda 100644
--- a/lib/msan/msan_report.cc
+++ b/lib/msan/msan_report.cc
@@ -35,7 +35,6 @@ class Decorator: private __sanitizer::AnsiColorDecorator {
};
static void PrintStack(const uptr *trace, uptr size) {
- SymbolizerScope sym_scope;
StackTrace::PrintStack(trace, size);
Printf("\n");
}
@@ -76,10 +75,7 @@ static void ReportSummary(const char *error_type, StackTrace *stack) {
if (!stack->size || !Symbolizer::Get()->IsAvailable()) return;
AddressInfo ai;
uptr pc = StackTrace::GetPreviousInstructionPc(stack->trace[0]);
- {
- SymbolizerScope sym_scope;
- Symbolizer::Get()->SymbolizeCode(pc, &ai, 1);
- }
+ Symbolizer::Get()->SymbolizeCode(pc, &ai, 1);
ReportErrorSummary(error_type, ai.file, ai.line, ai.function);
}