]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: keep seastar's sanitizers in lockstep with WITH_ASAN 69856/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 1 Jul 2026 05:01:05 +0000 (13:01 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 1 Jul 2026 05:02:57 +0000 (13:02 +0800)
Seastar_SANITIZE defaults to "DEFAULT", which turns on ASan and UBSan for
Debug and Sanitize builds regardless of ceph's WITH_ASAN. A Debug build
with WITH_ASAN=OFF then instruments seastar while ceph links tcmalloc, and
the seastar tests crash before main() because ASan calls the allocator via
dlsym before it is initialized.

Force Seastar_SANITIZE to follow WITH_ASAN, next to the other forced
Seastar_* cache variables, so seastar is sanitized only when ceph is. This
keeps the fix on the ceph side instead of carrying a seastar fork patch.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/CMakeLists.txt

index 6674ccdd38c39a9e9619e6c2843d1ecfdb6c5927..4eb283d49594e900d6c6a69c5334466f683ec4a7 100644 (file)
@@ -475,6 +475,11 @@ if(WITH_CRIMSON)
   set(Seastar_API_LEVEL "6" CACHE STRING "" FORCE)
   set(Seastar_IO_URING ${HAVE_LIBURING} CACHE BOOL "" FORCE)
   set(Seastar_DEPRECATED_OSTREAM_FORMATTERS OFF CACHE BOOL "" FORCE)
+  if(WITH_ASAN)
+    set(Seastar_SANITIZE "ON" CACHE STRING "" FORCE)
+  else()
+    set(Seastar_SANITIZE "OFF" CACHE STRING "" FORCE)
+  endif()
   if(Seastar_DPDK)
     find_package(dpdk QUIET)
     if(NOT DPDK_FOUND)