summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-02-14 16:06:22 +0000
committerDmitry Vyukov <dvyukov@google.com>2015-02-14 16:06:22 +0000
commit6aaedb0829438b8d43c6506ee5e4e10fbee860ae (patch)
treec2602c5e0935b876392f6ff713f40fb891fd2a9a
parent025c0ad74c73648ddb4456354cbc7690afd21166 (diff)
downloadbcm5719-llvm-6aaedb0829438b8d43c6506ee5e4e10fbee860ae.tar.gz
bcm5719-llvm-6aaedb0829438b8d43c6506ee5e4e10fbee860ae.zip
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. llvm-svn: 229262
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
index d1621454242..dc9438e6371 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
@@ -112,16 +112,10 @@ static ReportStack *SymbolizeStack(StackTrace trace) {
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;
OpenPOWER on IntegriCloud