Files
clang-p2996/compiler-rt/lib/lsan/lsan_linux.cpp
Vitaly Buka 7760272778 [lsan] Don't crash on ThreadRegistry::threads_ data race
Comment "No lock needed" in CurrentThreadContext was wrong.
Concurent ThreadRegistry::CreateThread can resize and relocate
ThreadRegistry::threads_ the same time CurrentThreadContext reads it.

To mitigate lock cost we store ThreadContext* instead of tid in
THREADLOCAL cache, we can tid from the ThreadContext*.

Reviewed By: kstoimenov, MaskRay

Differential Revision: https://reviews.llvm.org/D148281
2023-04-17 15:33:43 -07:00

1.2 KiB