Skip to content

Commit 8f93365

Browse files
vonosmasvitalybuka
andauthored
[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@google.com>
1 parent 4b267d5 commit 8f93365

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/lib/tsan/rtl/tsan.syms.extra

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
__cxa_guard_acquire
2+
__cxa_guard_abort
3+
__cxa_guard_release
14
__tsan_init
25
__tsan_flush_memory
36
__tsan_read*

0 commit comments

Comments
 (0)