diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aab7ccc96..655a09d31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -383,31 +383,41 @@ jobs: CXX: clang++-19 - name: Run tests (MPI) run: | - export ASAN_RUN=1 source scripts/run_mpi.sh "--oversubscribe" env: PROC_COUNT: 2 OMP_NUM_THREADS: 2 + ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 - name: Run tests (threads, num_threads=1) run: source scripts/run_threads.sh env: OMP_NUM_THREADS: 1 ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 - name: Run tests (threads, num_threads=2) run: source scripts/run_threads.sh env: OMP_NUM_THREADS: 2 ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 - name: Run tests (threads, num_threads=3) run: source scripts/run_threads.sh env: OMP_NUM_THREADS: 3 ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 - name: Run tests (threads, num_threads=4) run: source scripts/run_threads.sh env: OMP_NUM_THREADS: 4 ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 ubuntu-clang-sanitizer-build-extended: needs: - ubuntu-clang-sanitizer-build diff --git a/cmake/sanitizers.cmake b/cmake/sanitizers.cmake index d09e2b282..460d7abd1 100644 --- a/cmake/sanitizers.cmake +++ b/cmake/sanitizers.cmake @@ -6,8 +6,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") message(STATUS "Enabled address sanitizer") endif() if (ENABLE_UB_SANITIZER) - add_compile_options(-fsanitize=undefined) - add_link_options(-fsanitize=undefined) + add_compile_options(-fsanitize=undefined -fno-sanitize=signed-integer-overflow) + add_link_options(-fsanitize=undefined -fno-sanitize=signed-integer-overflow) message(STATUS "Enabled UB sanitizer") endif() else()