mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix: Use BOOST_USE_TSAN instead of BOOST_USE_ASAN for TSAN builds
The cleanup in959c7bcae2merged separate ASAN/TSAN if-blocks into one, but incorrectly defined BOOST_USE_ASAN for both. TSAN builds don't link ASan's runtime, so __sanitizer_start/finish_switch_fiber are unresolved. Restore the original separate blocks fromd2079574c7. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,13 +55,20 @@ endif()
|
||||
# stack-use-after-scope errors. BOOST_USE_UCONTEXT ensures the ucontext backend
|
||||
# is selected (fcontext does not support ASAN annotations).
|
||||
# These defines must match what Boost was compiled with (see conan/profiles/sanitizers).
|
||||
# TSAN also requires the ucontext backend so that Boost.Context uses
|
||||
# POSIX ucontext (not fcontext assembly) for fiber switching. This
|
||||
# allows TSAN to properly track context switches and avoids false positives.
|
||||
# These defines must match what Boost was compiled with (see conan/profiles/sanitizers).
|
||||
if(enable_asan OR enable_tsan)
|
||||
if(enable_asan)
|
||||
target_compile_definitions(
|
||||
xrpl_boost
|
||||
INTERFACE BOOST_USE_ASAN BOOST_USE_UCONTEXT
|
||||
)
|
||||
endif()
|
||||
|
||||
# TSAN also requires the ucontext backend so that Boost.Context uses
|
||||
# POSIX ucontext (not fcontext assembly) for fiber switching. This
|
||||
# allows TSAN to properly track context switches and avoids false positives.
|
||||
# These defines must match what Boost was compiled with (see conan/profiles/sanitizers).
|
||||
if(enable_tsan)
|
||||
target_compile_definitions(
|
||||
xrpl_boost
|
||||
INTERFACE BOOST_USE_TSAN BOOST_USE_UCONTEXT
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user