[compiler-rt] 8f93365 - [tsan] Export __cxa_guard_ interceptors from TSan runtime. (#171921)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 14 08:53:27 PST 2025
Author: Alexey Samsonov
Date: 2025-12-14T08:53:22-08:00
New Revision: 8f93365b19e24b70408e40005a77224603c6f9b9
URL: https://github.com/llvm/llvm-project/commit/8f93365b19e24b70408e40005a77224603c6f9b9
DIFF: https://github.com/llvm/llvm-project/commit/8f93365b19e24b70408e40005a77224603c6f9b9.diff
LOG: [tsan] Export __cxa_guard_ interceptors from TSan runtime. (#171921)
These functions from C++ ABI are defined in
compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp and are supposed to
replace implementations from libstdc++/libc++abi.
We need to export them similar to why we need to export other
interceptors and TSan runtime functions - e.g. if a dlopen-ed shared
library depends on `__cxa_guard_acquire`, it needs to pick up the
exported definition from the TSan runtime that was linked into the main
executable calling the dlopen()
However, because the `__cxa_guard_` functions don't use traditional
interceptor machinery, they are omitted from the auto-generated
`libclang_rt.tsan.a.syms` files. Fix this by adding them to
tsan.syms.extra file explicitly.
Co-authored-by: Vitaly Buka <vitalybuka at google.com>
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan.syms.extra
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan.syms.extra b/compiler-rt/lib/tsan/rtl/tsan.syms.extra
index 6416e5d47fc41..03d17d21e74e8 100644
--- a/compiler-rt/lib/tsan/rtl/tsan.syms.extra
+++ b/compiler-rt/lib/tsan/rtl/tsan.syms.extra
@@ -1,3 +1,6 @@
+__cxa_guard_acquire
+__cxa_guard_abort
+__cxa_guard_release
__tsan_init
__tsan_flush_memory
__tsan_read*
More information about the llvm-commits
mailing list