llvm-capstone/compiler-rt/lib/tsan
Kenny Yu 1146d96096
[TSAN] Add __tsan_check_no_mutexes_held helper (#71568)
This adds a new helper that can be called from application code to
ensure that no mutexes are held on specific code paths. This is useful
for multiple scenarios, including ensuring no locks are held:

- at thread exit
- in peformance-critical code
- when a coroutine is suspended (can cause deadlocks)

See this discourse thread for more discussion:

https://discourse.llvm.org/t/add-threadsanitizer-check-to-prevent-coroutine-suspending-while-holding-a-lock-potential-deadlock/74051

This resubmits and fixes #69372 (was reverted because of build
breakage).
This also includes the followup change #71471 (to fix a land race).
2023-11-08 08:02:14 +01:00
..
benchmarks
dd
go tsan: fix string comparison in Go build script 2023-05-17 10:36:45 +02:00
rtl [TSAN] Add __tsan_check_no_mutexes_held helper (#71568) 2023-11-08 08:02:14 +01:00
tests [compiler-rt] Avoid memintrinsic calls inserted by the compiler 2023-06-06 16:10:45 +02:00
.clang-format
analyze_libtsan.sh
check_analyze.sh
check_cmake.sh
CMakeLists.txt