diff --git a/.github/workflows/code_sanitizers.yml b/.github/workflows/code_sanitizers.yml index 3bc0439c61..c82c31b280 100644 --- a/.github/workflows/code_sanitizers.yml +++ b/.github/workflows/code_sanitizers.yml @@ -13,9 +13,10 @@ jobs: COMPILER: [ clang ] SANITIZER: - { name: UBSAN, ignore_errors: false } - - { name: ASAN, ignore_errors: true } - - { name: ASAN_INT, ignore_errors: true } + - { name: ASAN, ignore_errors: false, leak_check: false } + - { name: ASAN_INT, ignore_errors: true, leak_check: false } - { name: TSAN, ignore_errors: true } + - { name: LEAK, ignore_errors: true, leak_check: true } runs-on: ubuntu-22.04 env: COMPILER: ${{ matrix.COMPILER }} @@ -24,7 +25,7 @@ jobs: IGNORE_ERRORS: ${{ matrix.SANITIZER.ignore_errors }} TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }} DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }} - ASAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:suppressions=../asan_suppressions + ASAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:suppressions=../asan_suppressions:detect_leaks=${{ matrix.SANITIZER.leak_check && '1' || '0' }} TSAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:suppressions=../tsan_suppressions UBSAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:print_stacktrace=1 if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository @@ -70,7 +71,7 @@ jobs: COMPILER: [ clang ] SANITIZER: - { name: UBSAN, ignore_errors: false } - - { name: ASAN, ignore_errors: true } + - { name: ASAN, ignore_errors: false } - { name: TSAN, ignore_errors: true } runs-on: macos-14 env: diff --git a/ci/build.sh b/ci/build.sh index 07976992a4..4aabc4d0fb 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -39,6 +39,9 @@ if [[ ${SANITIZER:-} ]]; then UBSAN) CMAKE_SANITIZER="-DNANO_UBSAN=ON" ;; + LEAK) + CMAKE_SANITIZER="-DNANO_ASAN=ON" + ;; *) echo "Unknown sanitizer: '${SANITIZER}'" exit 1