[compiler-rt] 2df1019 - Revert "tsan: print a meaningful frame for stack races"
Amy Kwan via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 1 14:42:37 PDT 2021
Author: Amy Kwan
Date: 2021-10-01T16:42:30-05:00
New Revision: 2df1019576dbb369a8f5c33b34d013f2780f6a08
URL: https://github.com/llvm/llvm-project/commit/2df1019576dbb369a8f5c33b34d013f2780f6a08
DIFF: https://github.com/llvm/llvm-project/commit/2df1019576dbb369a8f5c33b34d013f2780f6a08.diff
LOG: Revert "tsan: print a meaningful frame for stack races"
This reverts commit ccc83ac7c501c8e117753af0729414350aa9c117.
Reverting this commit as it is dependent on additional commits breaking the
PPC BE bots.
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
index 61133a4a3e7ea..67b12c804fb25 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
@@ -138,8 +138,6 @@ void ThreadContext::OnCreated(void *arg) {
creation_stack_id = CurrentStackId(args->thr, args->pc);
}
-extern "C" void __tsan_stack_initialization() {}
-
struct OnStartedArgs {
ThreadState *thr;
uptr stk_addr;
@@ -175,15 +173,9 @@ void ThreadStart(ThreadState *thr, Tid tid, tid_t os_id,
#endif
#if !SANITIZER_GO
- // Don't imitate stack/TLS writes for the main thread,
- // because its initialization is synchronized with all
- // subsequent threads anyway.
if (tid != kMainTid) {
- if (stk_addr && stk_size) {
- const uptr pc = StackTrace::GetNextInstructionPc(
- reinterpret_cast<uptr>(__tsan_stack_initialization));
- MemoryRangeImitateWrite(thr, pc, stk_addr, stk_size);
- }
+ if (stk_addr && stk_size)
+ MemoryRangeImitateWrite(thr, /*pc=*/1, stk_addr, stk_size);
if (tls_addr && tls_size)
ImitateTlsWrite(thr, tls_addr, tls_size);
More information about the llvm-commits
mailing list