From 211e13d56670950da94ad628f72cb88c7c9b5f74 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Mon, 24 Jul 2023 00:48:12 -0400 Subject: [PATCH] ci: add asan --- .github/workflows/sanitize.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml index 3d470a84..bb085eae 100644 --- a/.github/workflows/sanitize.yml +++ b/.github/workflows/sanitize.yml @@ -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