3 Commits

Author SHA1 Message Date
Vitaly Buka
e6191923f5 [NFC][lsan] Rename test function 2023-04-18 12:47:23 -07:00
Vitaly Buka
1e1d1b1b5a [lsan] Disabled D148281 test on Darwin
For unknown reason it fails to link.
2023-04-18 12:47:23 -07:00
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