@@ -379,16 +379,16 @@ jobs:
379379 flags : ${{ matrix.suite }}
380380 use_oidc : true
381381
382- rust-test :
383- name : " Rust tests (sanitizer)"
382+ rust-test-asan :
383+ name : " Rust tests (address sanitizer)"
384384 timeout-minutes : 40
385385 runs-on : >-
386386 ${{ github.repository == 'vortex-data/vortex'
387- && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-sanitizer', github.run_id)
387+ && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-address- sanitizer', github.run_id)
388388 || 'ubuntu-latest' }}
389389 env :
390390 # Add debug symbols and enable ASAN/LSAN with better output
391- ASAN_OPTIONS : " symbolize=1:print_stats=1:check_initialization_order=1:detect_leaks=1:halt_on_error=0: verbosity=1:leak_check_at_exit=1"
391+ ASAN_OPTIONS : " symbolize=1:print_stats=1:check_initialization_order=1:detect_leaks=1:verbosity=1:leak_check_at_exit=1"
392392 LSAN_OPTIONS : " verbosity=1:report_objects=1"
393393 ASAN_SYMBOLIZER_PATH : " /usr/bin/llvm-symbolizer"
394394 # Link against DuckDB debug build
@@ -416,14 +416,124 @@ jobs:
416416 # Build with full debug info first (helps with caching)
417417 cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
418418 --target x86_64-unknown-linux-gnu \
419- -p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
419+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
420+
420421 # Run tests with sanitizers and debug output
421422 cargo +$NIGHTLY_TOOLCHAIN nextest run \
422423 --locked \
423424 --all-features \
424425 --no-fail-fast \
425426 --target x86_64-unknown-linux-gnu \
426- -p vortex-buffer -p vortex-ffi -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
427+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
428+
429+ # vortex-ffi requires --no-default-features as otherwise we pull in
430+ # Mimalloc which interferes with sanitizers
431+ # cargo nextest reports less leaks than cargo test
432+ cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
433+ -Zbuild-std --no-fail-fast --target x86_64-unknown-linux-gnu \
434+ -p vortex-ffi -- --no-capture
435+
436+ rust-test-msan :
437+ name : " Rust tests (memory sanitizer)"
438+ timeout-minutes : 40
439+ runs-on : >-
440+ ${{ github.repository == 'vortex-data/vortex'
441+ && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-memory-sanitizer', github.run_id)
442+ || 'ubuntu-latest' }}
443+ env :
444+ # Add debug symbols and enable ASAN/LSAN with better output
445+ MSAN_OPTIONS : " symbolize=1:print_stats=1:verbosity=1"
446+ MSAN_SYMBOLIZER_PATH : " /usr/bin/llvm-symbolizer"
447+ # Link against DuckDB debug build
448+ VX_DUCKDB_DEBUG : " 1"
449+ # Keep frame pointers for better stack traces
450+ CARGO_PROFILE_DEV_DEBUG : " true"
451+ CARGO_PROFILE_TEST_DEBUG : " true"
452+ # Skip slow tests that are too expensive under sanitizer
453+ VORTEX_SKIP_SLOW_TESTS : " 1"
454+ steps :
455+ - uses : runs-on/action@v2
456+ if : github.repository == 'vortex-data/vortex'
457+ with :
458+ sccache : s3
459+ - uses : actions/checkout@v6
460+ - uses : ./.github/actions/setup-prebuild
461+ - name : Install nightly for sanitizer
462+ run : |
463+ rustup toolchain install $NIGHTLY_TOOLCHAIN
464+ rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
465+ - name : Rust Tests
466+ env :
467+ RUSTFLAGS : " -A warnings -Zsanitizer=memory -Cunsafe-allow-abi-mismatch=sanitizer --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 -C opt-level=0 -C strip=none"
468+ run : |
469+ # Build with full debug info first (helps with caching)
470+ cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
471+ -Zbuild-std --target x86_64-unknown-linux-gnu \
472+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
473+
474+ # Run tests with sanitizers and debug output
475+ cargo +$NIGHTLY_TOOLCHAIN nextest run \
476+ --locked --all-features --no-fail-fast \
477+ -Zbuild-std --target x86_64-unknown-linux-gnu \
478+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
479+
480+ # vortex-ffi requires --no-default-features as otherwise we pull in
481+ # Mimalloc which interferes with sanitizers
482+ # cargo nextest reports less leaks than cargo test
483+ cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
484+ -Zbuild-std --no-fail-fast --target x86_64-unknown-linux-gnu \
485+ -p vortex-ffi -- --no-capture
486+
487+ rust-test-tsan :
488+ name : " Rust tests (thread sanitizer)"
489+ timeout-minutes : 40
490+ runs-on : >-
491+ ${{ github.repository == 'vortex-data/vortex'
492+ && format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-thread-sanitizer', github.run_id)
493+ || 'ubuntu-latest' }}
494+ env :
495+ # Add debug symbols and enable ASAN/LSAN with better output
496+ TSAN_OPTIONS : " symbolize=1:verbosity=1"
497+ TSAN_SYMBOLIZER_PATH : " /usr/bin/llvm-symbolizer"
498+ # Link against DuckDB debug build
499+ VX_DUCKDB_DEBUG : " 1"
500+ # Keep frame pointers for better stack traces
501+ CARGO_PROFILE_DEV_DEBUG : " true"
502+ CARGO_PROFILE_TEST_DEBUG : " true"
503+ # Skip slow tests that are too expensive under sanitizer
504+ VORTEX_SKIP_SLOW_TESTS : " 1"
505+ steps :
506+ - uses : runs-on/action@v2
507+ if : github.repository == 'vortex-data/vortex'
508+ with :
509+ sccache : s3
510+ - uses : actions/checkout@v6
511+ - uses : ./.github/actions/setup-prebuild
512+ - name : Install nightly for sanitizer
513+ run : |
514+ rustup toolchain install $NIGHTLY_TOOLCHAIN
515+ rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
516+ - name : Rust Tests
517+ env :
518+ RUSTFLAGS : " -A warnings -Zsanitizer=thread -Cunsafe-allow-abi-mismatch=sanitizer --cfg disable_loom --cfg vortex_nightly -C debuginfo=2 -C opt-level=0 -C strip=none"
519+ run : |
520+ # Build with full debug info first (helps with caching)
521+ cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
522+ -Zbuild-std --target x86_64-unknown-linux-gnu \
523+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
524+
525+ # Run tests with sanitizers and debug output
526+ cargo +$NIGHTLY_TOOLCHAIN nextest run \
527+ -Zbuild-std --locked --all-features \
528+ --no-fail-fast --target x86_64-unknown-linux-gnu \
529+ -p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
530+
531+ # vortex-ffi requires --no-default-features as otherwise we pull in
532+ # Mimalloc which interferes with sanitizers
533+ # cargo nextest reports less issues than cargo test
534+ cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
535+ -Zbuild-std --no-fail-fast --target x86_64-unknown-linux-gnu \
536+ -p vortex-ffi -- --no-capture
427537
428538 cuda-build-lint :
429539 if : github.repository == 'vortex-data/vortex'
0 commit comments