[compiler-rt] r180781 - tsan: reverse stack trace for failed CHECK's, this is how we print traces in other places
Dmitry Vyukov
dvyukov at google.com
Tue Apr 30 04:57:33 PDT 2013
Author: dvyukov
Date: Tue Apr 30 06:57:32 2013
New Revision: 180781
URL: http://llvm.org/viewvc/llvm-project?rev=180781&view=rev
Log:
tsan: reverse stack trace for failed CHECK's, this is how we print traces in other places
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc?rev=180781&r1=180780&r2=180781&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc Tue Apr 30 06:57:32 2013
@@ -695,6 +695,11 @@ void PrintCurrentStackSlow() {
sizeof(__sanitizer::StackTrace))) __sanitizer::StackTrace;
ptrace->SlowUnwindStack(__sanitizer::StackTrace::GetCurrentPc(),
kStackTraceMax);
+ for (uptr i = 0; i < ptrace->size / 2; i++) {
+ uptr tmp = ptrace->trace[i];
+ ptrace->trace[i] = ptrace->trace[ptrace->size - i - 1];
+ ptrace->trace[ptrace->size - i - 1] = tmp;
+ }
StackTrace trace;
trace.Init(ptrace->trace, ptrace->size);
PrintStack(SymbolizeStack(trace));
More information about the llvm-commits
mailing list