[compiler-rt] [sanitizer] Fix asserts in asan and tsan in pthread interceptors. (PR #75394)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 14:49:41 PST 2024
================
@@ -23,6 +23,9 @@ void ThreadArgRetval::CreateLocked(uptr thread, bool detached,
Data& t = data_[thread];
t = {};
t.gen = gen_++;
+ static_assert(sizeof(gen_) == sizeof(u32) && kInvalidGen == UINT32_MAX);
+ if (gen_ == kInvalidGen)
----------------
vitalybuka wrote:
I guess I missed `if (gen_ == kInvalidGen) = 0`,
so we don't need the one introduced with https://github.com/llvm/llvm-project/pull/75394/commits/b96deb8525d6ca6d94bcf99d808b1912be1f8068
https://github.com/llvm/llvm-project/pull/75394
More information about the llvm-commits
mailing list