diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-09-24 13:47:29 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-09-24 23:58:21 -0700 |
| commit | a40cdad18c06fd377622c47aa34564df7ea959b5 (patch) | |
| tree | dbcfabc2191cdbf2acc6c356c5ea25237b29d8f1 /lib/tsan/tsan_rtl_thread.cpp | |
| parent | 7f6b7c56089eaa5b147e71b3d98328498c9025c8 (diff) | |
| download | zig-a40cdad18c06fd377622c47aa34564df7ea959b5.tar.gz zig-a40cdad18c06fd377622c47aa34564df7ea959b5.zip | |
tsan: Update to LLVM 19.1.0.
Diffstat (limited to 'lib/tsan/tsan_rtl_thread.cpp')
| -rw-r--r-- | lib/tsan/tsan_rtl_thread.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/tsan/tsan_rtl_thread.cpp b/lib/tsan/tsan_rtl_thread.cpp index 77488f8432..5316a7862e 100644 --- a/lib/tsan/tsan_rtl_thread.cpp +++ b/lib/tsan/tsan_rtl_thread.cpp @@ -160,6 +160,10 @@ void ThreadStart(ThreadState *thr, Tid tid, tid_t os_id, } Free(thr->tctx->sync); +#if !SANITIZER_GO + thr->is_inited = true; +#endif + uptr stk_addr = 0; uptr stk_size = 0; uptr tls_addr = 0; @@ -200,15 +204,11 @@ void ThreadStart(ThreadState *thr, Tid tid, tid_t os_id, } void ThreadContext::OnStarted(void *arg) { - thr = static_cast<ThreadState *>(arg); DPrintf("#%d: ThreadStart\n", tid); - new (thr) ThreadState(tid); + thr = new (arg) ThreadState(tid); if (common_flags()->detect_deadlocks) thr->dd_lt = ctx->dd->CreateLogicalThread(tid); thr->tctx = this; -#if !SANITIZER_GO - thr->is_inited = true; -#endif } void ThreadFinish(ThreadState *thr) { |
