[compiler-rt] r229262 - tsan: always subtract one from program counters
Dmitry Vyukov
dvyukov at google.com
Sat Feb 14 08:06:22 PST 2015
Author: dvyukov
Date: Sat Feb 14 10:06:22 2015
New Revision: 229262
URL: http://llvm.org/viewvc/llvm-project?rev=229262&view=rev
Log:
tsan: always subtract one from program counters
Go has a pending change to pass proper PCs to tsan:
https://go-review.googlesource.com/#/c/4902/
So now we can always subtract one from PCs.
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=229262&r1=229261&r2=229262&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc Sat Feb 14 10:06:22 2015
@@ -112,16 +112,10 @@ static ReportStack *SymbolizeStack(Stack
for (uptr si = 0; si < trace.size; si++) {
const uptr pc = trace.trace[si];
uptr pc1 = pc;
-#ifndef SANITIZER_GO
// We obtain the return address, but we're interested in the previous
// instruction.
if ((pc & kExternalPCBit) == 0)
pc1 = StackTrace::GetPreviousInstructionPc(pc);
-#else
- // FIXME(dvyukov): Go sometimes uses address of a function as top pc.
- if (si != trace.size - 1)
- pc1 -= 1;
-#endif
SymbolizedStack *ent = SymbolizeCode(pc1);
CHECK_NE(ent, 0);
SymbolizedStack *last = ent;
More information about the llvm-commits
mailing list