Skip to content

Commit 90e7e65

Browse files
authored
Use ThreadSanitizer CI setup that avoids false positives (#406)
1 parent bc4a6d5 commit 90e7e65

3 files changed

Lines changed: 4 additions & 28 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ jobs:
120120
- uses: actions/checkout@v2
121121
- name: Install Rust
122122
run: rustup update nightly && rustup default nightly
123-
- name: TSAN / MSAN
123+
- name: Install rust-src
124+
run: rustup component add rust-src
125+
- name: ASAN / TSAN
124126
run: . ci/tsan.sh
125127

126128
# Loom

‎ci/tsan‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎ci/tsan.sh‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
set -ex
44

5-
export RUST_TEST_THREADS=1
65
export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0"
7-
export TSAN_OPTIONS="suppressions=$(pwd)/ci/tsan"
86

97
# Run address sanitizer
108
RUSTFLAGS="-Z sanitizer=address" \
119
cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut
1210

1311
# Run thread sanitizer
1412
RUSTFLAGS="-Z sanitizer=thread" \
15-
cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut
13+
cargo -Zbuild-std test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut

0 commit comments

Comments
 (0)