From 5e392264e07f75f8f24860f84861f96d37bc2ca4 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 13 Aug 2025 16:55:55 +0200 Subject: [PATCH 1/3] [cmake] clarify asan build option is only for gcc or clang --- cmake/modules/RootBuildOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 8a849082bf666..c65d28bea7017 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -197,7 +197,7 @@ option(minimal "Enable only required options by default" OFF) option(rootbench "Build rootbench if rootbench exists in root or if it is a sibling directory." OFF) option(roottest "Build roottest if roottest exists in root or if it is a sibling directory." OFF) option(testing "Enable testing with CTest" OFF) -option(asan "Build ROOT with address sanitizer instrumentation" OFF) +option(asan "Build ROOT with address sanitizer instrumentation (only GCC or Clang)" OFF) set(gcctoolchain "" CACHE PATH "Set path to GCC toolchain used to build llvm/clang") From 8138181590fe49a8840dd3ad697dae0a42031539 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 13 Aug 2025 16:59:44 +0200 Subject: [PATCH 2/3] [core] do not interrupt build when an asan error is found Just print error to console --- core/sanitizer/SanitizerSetup.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/sanitizer/SanitizerSetup.cxx b/core/sanitizer/SanitizerSetup.cxx index 603183ccd4ba1..858e5bdcd310a 100644 --- a/core/sanitizer/SanitizerSetup.cxx +++ b/core/sanitizer/SanitizerSetup.cxx @@ -31,7 +31,8 @@ const char* __asan_default_options() { ":detect_container_overflow=1" ":alloc_dealloc_mismatch=0" DETECT_LEAKS - ":verify_asan_link_order=0"; + ":verify_asan_link_order=0" + ":halt_on_error=0"; } /// Default options when leak sanitizer starts up in ROOT exectuables. From 28463edc778e8ca96d6b8ae7e9f2caced931c87a Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 13 Aug 2025 17:08:04 +0200 Subject: [PATCH 3/3] [ci] enable asan in Ubu24 build --- .github/workflows/root-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/root-ci.yml b/.github/workflows/root-ci.yml index 029e4de73c02d..93091dd877afe 100644 --- a/.github/workflows/root-ci.yml +++ b/.github/workflows/root-ci.yml @@ -385,7 +385,9 @@ jobs: - image: ubuntu22 overrides: ["imt=Off", "CMAKE_BUILD_TYPE=Debug"] - image: ubuntu2404 - overrides: ["CMAKE_BUILD_TYPE=Debug"] + is_special: true + property: ASAN + overrides: ["CMAKE_BUILD_TYPE=Debug", "asan=ON"] - image: ubuntu2504 overrides: ["CMAKE_CXX_STANDARD=23"] # Disable until binutils 2.45-5 is part of the distro, as it fixes the ".cfi_escape with op" warning.