Skip to content

Fix Miri test failure #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
- run: cargo miri test
env:
# -Zmiri-ignore-leaks is needed because we use detached threads in doctests
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-ignore-leaks
# TODO: remove -Zmiri-disable-weak-memory-emulation
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-disable-weak-memory-emulation -Zmiri-ignore-leaks
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout

security_audit:
Expand Down
2 changes: 1 addition & 1 deletion tests/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn get_mut() {
#[test]
fn contention() {
const N: u32 = 10;
const M: usize = 1000;
const M: usize = if cfg!(miri) { 100 } else { 1000 };

let (tx, rx) = async_channel::unbounded();
let tx = Arc::new(tx);
Expand Down