Skip to content

Commit 3b30fba

Browse files
bors[bot]taiki-e
andauthored
Merge #791
791: Enable -Z randomize-layout in miri CI r=taiki-e a=taiki-e Co-authored-by: Taiki Endo <[email protected]>
2 parents b4d594c + 8786237 commit 3b30fba

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

ci/crossbeam-epoch-loom.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euxo pipefail
33
IFS=$'\n\t'
44
cd "$(dirname "$0")"/../crossbeam-epoch
55

6-
export RUSTFLAGS="-D warnings --cfg crossbeam_loom --cfg crossbeam_sanitize"
6+
export RUSTFLAGS="${RUSTFLAGS:-} --cfg crossbeam_loom --cfg crossbeam_sanitize"
77

88
# With MAX_PREEMPTIONS=2 the loom tests (currently) take around 11m.
99
# If we were to run with =3, they would take several times that,

ci/miri.sh

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ set -euxo pipefail
33
IFS=$'\n\t'
44
cd "$(dirname "$0")"/..
55

6+
export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout"
7+
68
MIRIFLAGS="-Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-tag-raw-pointers" \
79
cargo miri test \
810
-p crossbeam-queue

ci/san.sh

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ rustup component add rust-src
1414
# `cfg(crossbeam_sanitize)` with `cfg(sanitize = "..")` and remove
1515
# `--cfg crossbeam_sanitize`.
1616
cargo clean
17-
RUSTFLAGS="-Dwarnings -Zsanitizer=address --cfg crossbeam_sanitize" \
18-
cargo test --all --release --target x86_64-unknown-linux-gnu --tests \
17+
RUSTFLAGS="${RUSTFLAGS:-} -Z sanitizer=address --cfg crossbeam_sanitize" \
18+
cargo test --all --release --target x86_64-unknown-linux-gnu --tests \
1919
--exclude crossbeam-skiplist --exclude benchmarks -- --test-threads=1
2020

2121
# There are memory leaks in crossbeam-skiplist.
2222
# https://github.com/crossbeam-rs/crossbeam/issues/614
2323
cargo clean
24-
RUSTFLAGS="-Dwarnings -Zsanitizer=address --cfg crossbeam_sanitize" \
25-
cargo test --release --target x86_64-unknown-linux-gnu \
24+
RUSTFLAGS="${RUSTFLAGS:-} -Z sanitizer=address --cfg crossbeam_sanitize" \
25+
cargo test --release --target x86_64-unknown-linux-gnu \
2626
-p crossbeam-skiplist --test map --test set
2727
cargo clean
2828
ASAN_OPTIONS="detect_leaks=0" \
29-
RUSTFLAGS="-Dwarnings -Zsanitizer=address --cfg crossbeam_sanitize" \
30-
cargo test --release --target x86_64-unknown-linux-gnu \
29+
RUSTFLAGS="${RUSTFLAGS:-} -Z sanitizer=address --cfg crossbeam_sanitize" \
30+
cargo test --release --target x86_64-unknown-linux-gnu \
3131
-p crossbeam-skiplist --tests
3232

3333
cargo clean
34-
RUSTFLAGS="-Dwarnings -Zsanitizer=address --cfg crossbeam_sanitize" \
35-
cargo run \
34+
RUSTFLAGS="${RUSTFLAGS:-} -Z sanitizer=address --cfg crossbeam_sanitize" \
35+
cargo run \
3636
--release \
3737
--target x86_64-unknown-linux-gnu \
3838
--features nightly \
@@ -41,11 +41,11 @@ cargo run \
4141

4242
# Run memory sanitizer
4343
cargo clean
44-
RUSTFLAGS="-Dwarnings -Zsanitizer=memory --cfg crossbeam_sanitize" \
45-
cargo test -Zbuild-std --all --release --target x86_64-unknown-linux-gnu --tests --exclude benchmarks -- --test-threads=1
44+
RUSTFLAGS="${RUSTFLAGS:-} -Z sanitizer=memory --cfg crossbeam_sanitize" \
45+
cargo test -Z build-std --all --release --target x86_64-unknown-linux-gnu --tests --exclude benchmarks -- --test-threads=1
4646

4747
# Run thread sanitizer
4848
cargo clean
4949
TSAN_OPTIONS="suppressions=$(pwd)/ci/tsan" \
50-
RUSTFLAGS="-Dwarnings -Zsanitizer=thread --cfg crossbeam_sanitize" \
51-
cargo test -Zbuild-std --all --release --target x86_64-unknown-linux-gnu --tests --exclude benchmarks -- --test-threads=1
50+
RUSTFLAGS="${RUSTFLAGS:-} -Z sanitizer=thread --cfg crossbeam_sanitize" \
51+
cargo test -Z build-std --all --release --target x86_64-unknown-linux-gnu --tests --exclude benchmarks -- --test-threads=1

ci/test.sh

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ set -euxo pipefail
33
IFS=$'\n\t'
44
cd "$(dirname "$0")"/..
55

6-
export RUSTFLAGS="-D warnings"
7-
86
if [[ -n "${RUST_TARGET:-}" ]]; then
97
# If RUST_TARGET is specified, use cross for testing.
108
cross test --all --target "$RUST_TARGET" --exclude benchmarks -- --test-threads=1

0 commit comments

Comments
 (0)