[compiler-rt] TSAN: Report when thread is not live and referenced in pthread (PR #156921)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 10:17:45 PDT 2025
================
@@ -274,6 +274,11 @@ void ThreadRegistry::JoinThread(u32 tid, void *arg) {
{
ThreadRegistryLock l(this);
ThreadContextBase *tctx = threads_[tid];
+
+ if (!tctx) {
+ Report("%s: Tried to join thread %u, but it is not live.", SanitizerToolName, tid);
+ }
+
CHECK_NE(tctx, 0);
----------------
vitalybuka wrote:
can you move CHECK inside of if(!tctx), just for readablitity
to highlight that they are related
https://github.com/llvm/llvm-project/pull/156921
More information about the llvm-commits
mailing list