ci: add asan

This commit is contained in:
Amaan Qureshi 2023-07-24 00:48:12 -04:00
parent 56870fdda2
commit 211e13d566
No known key found for this signature in database
GPG key ID: E67890ADC4227273

View file

@ -9,7 +9,7 @@ on:
jobs:
check_undefined_behaviour:
name: Undefined behaviour checks
name: Sanitizer checks
runs-on: ubuntu-latest
env:
TREE_SITTER: ${{ github.workspace }}/target/release/tree-sitter
@ -38,3 +38,12 @@ jobs:
CFLAGS: -fsanitize=undefined
RUSTFLAGS: -lubsan
run: cargo test -- --test-threads 1
- name: Run main tests with address sanitizer (ASAN)
env:
CFLAGS: -fsanitize=address
RUSTFLAGS: -Zsanitizer=address
run: |
rustup install nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
cargo +nightly test -Z build-std --target x86_64-unknown-linux-gnu -- --test-threads 1