-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5408dc
commit 1edb490
Showing
3 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Run Sanitizers | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2020-03-08 | ||
override: true | ||
- uses: davidB/rust-cargo-make@v1 | ||
with: | ||
version: '0.30.0' | ||
- name: Sanitizers | ||
env: | ||
RUST_BACKTRACE: full | ||
RUST_LOG: 'trace' | ||
run: | | ||
tools/san_harness.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
rustup update | ||
rustup toolchain install nightly | ||
|
||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
TARGET_SELECT='' | ||
else | ||
TARGET_SELECT='x86_64-unknown-linux-gnu' | ||
fi | ||
|
||
# Run SANs | ||
echo "LSAN" | ||
cargo clean | ||
export RUSTFLAGS="-Z sanitizer=leak" | ||
cargo +nightly build --examples --target ${TARGET_SELECT} | ||
sudo -E target/${TARGET_SELECT}/debug/examples/parallel_computation | ||
sudo -E target/${TARGET_SELECT}/debug/examples/callbacks | ||
|
||
# ------------------------------- | ||
|
||
echo "TSAN" | ||
cargo clean | ||
export RUSTFLAGS="-Z sanitizer=thread" | ||
export TSAN_OPTIONS=suppressions=../../../../tools/tsan.suppressions | ||
cargo +nightly build --examples --target ${TARGET_SELECT} | ||
sudo -E target/${TARGET_SELECT}/debug/examples/parallel_computation | ||
sudo -E target/${TARGET_SELECT}/debug/examples/send_recv | ||
sudo -E target/${TARGET_SELECT}/debug/examples/callbacks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Anything comes from dynamic affinity pinner and load balancer of | ||
# Bastion doesn't need concrete guarantees. They are not that crucial. | ||
race:bastion_executor::blocking | ||
|
||
# There is a bug for this. There is a dangling ref in the drop. | ||
# Read more about it here: https://github.com/rust-lang/rust/issues/55005 | ||
race:Arc*drop | ||
race:Condvar::* | ||
race:std::sync::mpsc | ||
|
||
# Races of drop for the Receiver guard | ||
race:crossbeam_channel::counter::Receiver | ||
|
||
# OpenSSL FFI | ||
race:CRYPTO_THREAD* | ||
race:OPENSSL_* | ||
|
||
# Data races of mimalloc | ||
race:mi* | ||
race:_mi* | ||
|
||
# lazy_static and thread_local has barriers which are not | ||
# picked-up by TSAN. Like Lazy<T> and Local<T>. | ||
race:lazy_static | ||
race:std::thread::local |