diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-11-01 00:19:46 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-11-01 00:19:46 +0000 |
commit | a96c4dc70efa6e45b27640cdd9812e0817c9a75d (patch) | |
tree | 8329d4e18873b303855847ce5227029358a1d23d /lib/msan/msan_report.cc | |
parent | 66d91e3356a0c4d7aff3beaaaff3e87bbaec805c (diff) |
Consistently use StackTrace::PrintStack in ASan, LSan and MSan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_report.cc')
-rw-r--r-- | lib/msan/msan_report.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/msan/msan_report.cc b/lib/msan/msan_report.cc index bb591ebda..524e9752b 100644 --- a/lib/msan/msan_report.cc +++ b/lib/msan/msan_report.cc @@ -34,11 +34,6 @@ class Decorator: private __sanitizer::AnsiColorDecorator { const char *End() { return Default(); } }; -static void PrintStack(const uptr *trace, uptr size) { - StackTrace::PrintStack(trace, size); - Printf("\n"); -} - static void DescribeOrigin(u32 origin) { Decorator d; if (common_flags()->verbosity) @@ -60,14 +55,14 @@ static void DescribeOrigin(u32 origin) { // For some reason function address in LLVM IR is 1 less then the address // of the first instruction. pc += 1; - PrintStack(&pc, 1); + StackTrace::PrintStack(&pc, 1); } } else { uptr size = 0; const uptr *trace = StackDepotGet(origin, &size); Printf(" %sUninitialized value was created by a heap allocation%s\n", d.Origin(), d.End()); - PrintStack(trace, size); + StackTrace::PrintStack(trace, size); } } @@ -88,7 +83,7 @@ void ReportUMR(StackTrace *stack, u32 origin) { Printf("%s", d.Warning()); Report(" WARNING: MemorySanitizer: use-of-uninitialized-value\n"); Printf("%s", d.End()); - PrintStack(stack->trace, stack->size); + StackTrace::PrintStack(stack->trace, stack->size); if (origin) { DescribeOrigin(origin); } @@ -99,7 +94,7 @@ void ReportExpectedUMRNotFound(StackTrace *stack) { SpinMutexLock l(&CommonSanitizerReportMutex); Printf(" WARNING: Expected use of uninitialized value not found\n"); - PrintStack(stack->trace, stack->size); + StackTrace::PrintStack(stack->trace, stack->size); } void ReportAtExitStatistics() { |