Skip to content

Commit

Permalink
Separate leak sanitizer from ASAN run (#4435)
Browse files Browse the repository at this point in the history
* Do not ignore ASAN errors

* Add a separate leak check sanitizer job
  • Loading branch information
pwojcikdev authored Feb 14, 2024
1 parent dd5a00c commit 166b7ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/code_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 166b7ce

Please sign in to comment.