From 572cdaa7c0d8212b0cdeea26f4019083779f848c Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Sat, 4 May 2024 11:34:03 +0300 Subject: [PATCH] ci: fix address sanitizer step --- .github/workflows/build.yml | 2 +- .github/workflows/sanitize.yml | 12 ++++-------- cli/src/tests/corpus_test.rs | 9 +++++---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3db567ad..8f70b7d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: - { platform: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest , cli_features: wasm } - { platform: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest } - { platform: macos-arm64 , target: aarch64-apple-darwin , os: macos-14 , cli_features: wasm } - - { platform: macos-x64 , target: x86_64-apple-darwin , os: macos-latest , cli_features: wasm } + - { platform: macos-x64 , target: x86_64-apple-darwin , os: macos-12 , cli_features: wasm } # Cross compilers for C library - { platform: linux-arm64 , cc: aarch64-linux-gnu-gcc , ar: aarch64-linux-gnu-ar } diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml index d94d64dc..72bdd079 100644 --- a/.github/workflows/sanitize.yml +++ b/.github/workflows/sanitize.yml @@ -2,7 +2,7 @@ name: Sanitize env: CARGO_TERM_COLOR: always - RUSTFLAGS: "-D warnings" + RUSTFLAGS: -D warnings on: workflow_call: @@ -34,17 +34,13 @@ jobs: - name: Run main tests with undefined behaviour sanitizer (UBSAN) env: - UBSAN_OPTIONS: halt_on_error=1 CFLAGS: -fsanitize=undefined RUSTFLAGS: ${{ env.RUSTFLAGS }} -lubsan run: cargo test -- --test-threads 1 - name: Run main tests with address sanitizer (ASAN) env: - ASAN_OPTIONS: halt_on_error=1 + ASAN_OPTIONS: verify_asan_link_order=0 CFLAGS: -fsanitize=address - RUSTFLAGS: ${{ env.RUSTFLAGS }} -Zsanitizer=address --cfg=sanitizing - 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 + RUSTFLAGS: ${{ env.RUSTFLAGS }} -lasan --cfg sanitizing + run: cargo test -- --test-threads 1 diff --git a/cli/src/tests/corpus_test.rs b/cli/src/tests/corpus_test.rs index 10b1276f..5b1e78ff 100644 --- a/cli/src/tests/corpus_test.rs +++ b/cli/src/tests/corpus_test.rs @@ -76,10 +76,11 @@ fn test_corpus_for_json(seed: usize) { test_language_corpus("json", seed, None, None); } -// #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] -// fn test_corpus_for_php(seed: usize) { -// test_language_corpus("php", seed, None, Some("php")); -// } +#[ignore] +#[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] +fn test_corpus_for_php(seed: usize) { + test_language_corpus("php", seed, None, Some("php")); +} #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_python(seed: usize) {