From b280e8d326c09277c4d000cee713d523cf2c1983 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Mon, 27 Oct 2025 02:37:05 -0700 Subject: [PATCH] Enable more sanitizers in CI (#24117) ### What does this PR do? We were only enabling UBSAN in debug builds. This was probably a mistake. ### How did you verify your code works? --- cmake/targets/BuildBun.cmake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cmake/targets/BuildBun.cmake b/cmake/targets/BuildBun.cmake index 113c61fbff..b5adbc4d43 100644 --- a/cmake/targets/BuildBun.cmake +++ b/cmake/targets/BuildBun.cmake @@ -944,7 +944,7 @@ if(NOT WIN32) if (NOT ABI STREQUAL "musl") target_compile_options(${bun} PUBLIC -fsanitize=null - -fsanitize-recover=all + -fno-sanitize-recover=all -fsanitize=bounds -fsanitize=return -fsanitize=nullability-arg @@ -999,6 +999,20 @@ if(NOT WIN32) ) if(ENABLE_ASAN) + target_compile_options(${bun} PUBLIC + -fsanitize=null + -fno-sanitize-recover=all + -fsanitize=bounds + -fsanitize=return + -fsanitize=nullability-arg + -fsanitize=nullability-assign + -fsanitize=nullability-return + -fsanitize=returns-nonnull-attribute + -fsanitize=unreachable + ) + target_link_libraries(${bun} PRIVATE + -fsanitize=null + ) target_compile_options(${bun} PUBLIC -fsanitize=address) target_link_libraries(${bun} PUBLIC -fsanitize=address) endif()