From: Sun Yuechi Date: Sun, 21 Jun 2026 08:42:54 +0000 (+0800) Subject: crimson: build seastar with the default allocator under ASan X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1089fa3a6fd8d64685909ca4ef146f68843f0334;p=ceph.git crimson: build seastar with the default allocator under ASan With this build configured as RelWithDebInfo, seastar keeps its own allocator instead of falling back to libc's. Under ASan that allocator is called (via dlsym) before it is initialized and SIGSEGVs every seastar/crimson unittest before main(). Define SEASTAR_DEFAULT_ALLOCATOR under WITH_ASAN to keep seastar on the libc allocator. Signed-off-by: Sun Yuechi --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a93a38d7501..8b0cd023cfc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -510,6 +510,11 @@ if(WITH_CRIMSON) "-Wno-attributes" "-Wno-pessimizing-move" "-Wno-address-of-packed-member") + if(WITH_ASAN) + # As built here (RelWithDebInfo) seastar keeps its own allocator, which + # ASan calls via dlsym before init, crashing every test before main(). + target_compile_definitions(seastar PUBLIC SEASTAR_DEFAULT_ALLOCATOR) + endif() add_subdirectory(crimson) add_dependencies(crimson-osd erasure_code) endif()