diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2017-08-25 08:52:28 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2017-08-25 08:52:28 +0000 |
commit | 3d2a81a38bdbbb3624da9c1fef76c9cbfd43c199 (patch) | |
tree | cf183cc6e9e5c369cb2c834c350bc0eb387e524d /lib/tsan/rtl/tsan_rtl.h | |
parent | 3df7fc1705d67ca499eeab1585996f279aa1d125 (diff) |
tsan: don't pass bogus PCs to __tsan_symbolize_external
See the added comment for an explanation.
Reviewed in https://reviews.llvm.org/D37107
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl.h')
-rw-r--r-- | lib/tsan/rtl/tsan_rtl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tsan/rtl/tsan_rtl.h b/lib/tsan/rtl/tsan_rtl.h index 2cf2e1684..99c4d2529 100644 --- a/lib/tsan/rtl/tsan_rtl.h +++ b/lib/tsan/rtl/tsan_rtl.h @@ -825,7 +825,7 @@ void ALWAYS_INLINE TraceAddEvent(ThreadState *thr, FastState fs, return; DCHECK_GE((int)typ, 0); DCHECK_LE((int)typ, 7); - DCHECK_EQ(GetLsb(addr, 61), addr); + DCHECK_EQ(GetLsb(addr, kEventPCBits), addr); StatInc(thr, StatEvents); u64 pos = fs.GetTracePos(); if (UNLIKELY((pos % kTracePartSize) == 0)) { @@ -837,7 +837,7 @@ void ALWAYS_INLINE TraceAddEvent(ThreadState *thr, FastState fs, } Event *trace = (Event*)GetThreadTrace(fs.tid()); Event *evp = &trace[pos]; - Event ev = (u64)addr | ((u64)typ << 61); + Event ev = (u64)addr | ((u64)typ << kEventPCBits); *evp = ev; } |