From a4d977d9129dc3dd56e41ac8d2a59ce7471ee89e Mon Sep 17 00:00:00 2001 From: silverweed Date: Mon, 15 Jun 2026 17:18:09 +0200 Subject: [PATCH 1/4] [ci] Add minimal asan build --- .github/workflows/root-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/root-ci.yml b/.github/workflows/root-ci.yml index b971d8d14e1b4..e983385d414ec 100644 --- a/.github/workflows/root-ci.yml +++ b/.github/workflows/root-ci.yml @@ -415,6 +415,12 @@ jobs: is_special: true property: "clang Ninja builtins auto-registration off" overrides: ["CMAKE_CXX_STANDARD=20"] + # Asan build + - image: alma10 + platform_config: alma10-minimal + is_special: true + property: "asan" + overrides: ["asan=ON", "minimal=ON", "CMAKE_BUILD_TYPE=Debug"] # Fedora Rawhide with Python freethreading+debug build - image: rawhide python_venv: "/py-venv-3.15td/ROOT-CI" From 0c3c87e733878667ff013e307a7f3cf115a94845 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 13 Aug 2025 16:59:44 +0200 Subject: [PATCH 2/4] [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 edfd8e3af46a8..54cb77c31b411 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 executables. From 9231cb757ed6b8b9270aa6392ffc7da22787ebd9 Mon Sep 17 00:00:00 2001 From: silverweed Date: Tue, 16 Jun 2026 08:46:33 +0200 Subject: [PATCH 3/4] [cmake] clarify asan build option is only for gcc --- 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 0966ae13c3353..bcd3e6e1c154d 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -190,7 +190,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 (implies testing=ON)" OFF) option(roottest "Build roottest (implies testing=ON)" 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 is currently supported)" OFF) set(gcctoolchain "" CACHE PATH "Set path to GCC toolchain used to build llvm/clang") From b48a0e0a871b85679f231b07565da52e35f1f8cc Mon Sep 17 00:00:00 2001 From: silverweed Date: Tue, 16 Jun 2026 10:03:22 +0200 Subject: [PATCH 4/4] [ci] exclude faulty tests from asan build for now Tracked in issue https://github.com/root-project/root/issues/22632 --- .github/workflows/root-ci-config/build_root.py | 3 ++- .../buildconfig/alma10-minimal-asan.txt | 11 +++++++++++ .github/workflows/root-ci.yml | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt diff --git a/.github/workflows/root-ci-config/build_root.py b/.github/workflows/root-ci-config/build_root.py index 55fc2bf7eb653..27e49bb7049fc 100755 --- a/.github/workflows/root-ci-config/build_root.py +++ b/.github/workflows/root-ci-config/build_root.py @@ -92,9 +92,10 @@ def main(): build_utils.print_options_diff(options_dict, last_options) if args.overrides is not None: + overrides = ' '.join(args.overrides).split('@') print("Build option overrides from command line:") last_options = dict(options_dict) - options_dict.update((arg.split("=", maxsplit=1) for arg in args.overrides)) + options_dict.update((arg.split("=", maxsplit=1) for arg in overrides)) build_utils.print_options_diff(options_dict, last_options) ctest_custom_flags = "" diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt new file mode 100644 index 0000000000000..769c7c1f6fe0f --- /dev/null +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt @@ -0,0 +1,11 @@ +CMAKE_BUILD_TYPE=Debug +CMAKE_CXX_FLAGS_DEBUG="-Og -g" +asan=ON +ccache=ON +builtin_vdt=ON +fail-on-missing=ON +minimal=ON +roottest=ON +testing=ON +LSAN_OPTIONS=verbosity=1:log_threads=1 +ROOT_CTEST_CUSTOM_FLAGS="-E \(cppinterop-CppInterOpTest\|roottest-cling-specialobj-runf02$\|roottest-root-collection-DeleteWarning$\|roottest-root-io-evolution-fixarr2$\|roottest-root-meta-rlibmap$\|roottest-root-treeproxy-vectorint-vectorint$\)" diff --git a/.github/workflows/root-ci.yml b/.github/workflows/root-ci.yml index e983385d414ec..d1976c46bf5be 100644 --- a/.github/workflows/root-ci.yml +++ b/.github/workflows/root-ci.yml @@ -156,7 +156,7 @@ jobs: HOME: /Users/sftnight INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') && !matrix.platform == 'mac15' && !matrix.platform == 'mac26'}} GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }} - OVERRIDES: ${{ join( matrix.overrides, ' ') }} + OVERRIDES: ${{ join( matrix.overrides, '@') }} run: | [ -d "${VIRTUAL_ENV_DIR}" ] && source ${VIRTUAL_ENV_DIR}/bin/activate echo "Python is now $(which python3) $(python3 --version)" @@ -170,7 +170,7 @@ jobs: --head_sha ${{ github.event.pull_request.head.sha }} \ --repository ${{ github.server_url }}/${{ github.repository }} \ --platform ${{ matrix.platform }} \ - --overrides ${GLOBAL_OVERRIDES} ${OVERRIDES} + --overrides "${GLOBAL_OVERRIDES}" "${OVERRIDES}" - name: Workflow dispatch if: ${{ github.event_name == 'workflow_dispatch' && !matrix.is_special }} @@ -420,7 +420,7 @@ jobs: platform_config: alma10-minimal is_special: true property: "asan" - overrides: ["asan=ON", "minimal=ON", "CMAKE_BUILD_TYPE=Debug"] + overrides: ["ROOT_CTEST_CUSTOM_FLAGS='-E \\(^tutorial-\\|cppinterop-CppInterOpTest\\|roottest-cling-specialobj-runf02$\\|roottest-root-collection-DeleteWarning$\\|roottest-root-io-evolution-fixarr2$\\|roottest-root-meta-rlibmap$\\|roottest-root-treeproxy-vectorint-vectorint$\\)'"] # Fedora Rawhide with Python freethreading+debug build - image: rawhide python_venv: "/py-venv-3.15td/ROOT-CI"