@@ -386,10 +386,10 @@ jobs:
386386 fail-fast : false
387387 matrix :
388388 include :
389+ # We don't run memory sanitizer as it provides many false positives
390+ # for std
389391 - sanitizer : asan
390- sanitizer_flags : " -Zsanitizer=address -Zsanitize=leak"
391- - sanitizer : msan
392- sanitizer_flags : " -Zsanitizer=memory"
392+ sanitizer_flags : " -Zsanitizer=address,leak"
393393 - sanitizer : tsan
394394 sanitizer_flags : " -Zsanitizer=thread"
395395 name : " Rust tests (${{ matrix.sanitizer }})"
@@ -421,15 +421,16 @@ jobs:
421421 run : |
422422 rustup toolchain install $NIGHTLY_TOOLCHAIN
423423 rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
424- export RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}"
425424 - name : Build tests with sanitizer
426425 run : |
426+ RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}" \
427427 cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
428428 --target x86_64-unknown-linux-gnu -Zbuild-std \
429429 -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
430430
431431 - name : Run tests with sanitizer
432432 run : |
433+ RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}" \
433434 cargo +$NIGHTLY_TOOLCHAIN nextest run --locked --all-features \
434435 --target x86_64-unknown-linux-gnu --no-fail-fast -Zbuild-std \
435436 -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
@@ -440,6 +441,7 @@ jobs:
440441 # TODO(myrrc): remove --no-default-features once we make Mimalloc opt-in
441442 - name : Run vortex-ffi tests with sanitizer
442443 run : |
444+ RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}" \
443445 cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
444446 --target x86_64-unknown-linux-gnu --no-fail-fast -Zbuild-std \
445447 -p vortex-ffi -- --no-capture
@@ -452,7 +454,7 @@ jobs:
452454 # We don't run memory sanitizer as it's clang-only and provides many
453455 # false positives for Catch2
454456 - sanitizer : asan
455- sanitizer_flags : " -Zsanitizer=address -Zsanitize= leak"
457+ sanitizer_flags : " -Zsanitizer=address, leak"
456458 - sanitizer : tsan
457459 sanitizer_flags : " -Zsanitizer=thread"
458460 name : " Rust/C++ FFI tests (${{ matrix.sanitizer }})"
@@ -486,15 +488,13 @@ jobs:
486488 run : |
487489 rustup toolchain install $NIGHTLY_TOOLCHAIN
488490 rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
489-
490- # Export flags here so that rustfilt won't be built with sanitizers
491- export RUSTFLAGS="-A warnings -Cunsafe-allow-abi-mismatch=sanitizer \
492- --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 \
493- -C opt-level=0 -C strip=none -Zexternal-clangrt \
494- ${{ matrix.sanitizer_flags }}"
495491 - name : Build FFI library
496492 run : |
497493 # TODO(myrrc): remove --no-default-features
494+ RUSTFLAGS="-A warnings -Cunsafe-allow-abi-mismatch=sanitizer \
495+ --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 \
496+ -C opt-level=0 -C strip=none -Zexternal-clangrt \
497+ ${{ matrix.sanitizer_flags }}" \
498498 cargo +$NIGHTLY_TOOLCHAIN build --locked --no-default-features \
499499 --target x86_64-unknown-linux-gnu -Zbuild-std \
500500 -p vortex-ffi
0 commit comments