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 <sunyuechi@iscas.ac.cn>
"-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()