From 166b7ce488f76c6a681ae7c2fce0b4f3a6f30c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:07:37 +0100 Subject: [PATCH] Separate leak sanitizer from ASAN run (#4435) * Do not ignore ASAN errors * Add a separate leak check sanitizer job --- .github/workflows/code_sanitizers.yml | 9 +++++---- ci/build.sh | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_sanitizers.yml b/.github/workflows/code_sanitizers.yml index 3bc0439c..c82c31b2 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 07976992..4aabc4d0 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