Skip to content

Commit

Permalink
chore: add MIRI flag for exposed provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
polazarus committed Jan 10, 2025
1 parent a7a5979 commit 409d442
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
strategy:
matrix:
platform:
- s390x-unknown-linux-gnu # 32-bit LE
- s390x-unknown-linux-gnu # 32-bit BE
- powerpc64-unknown-linux-gnu # 64-bit BE
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
Expand All @@ -67,4 +67,8 @@ jobs:
components: miri

- name: Run tests under Miri
env:
MIRIFLAGS: >-
-Zmiri-permissive-provenance
-Zmiri-many-seeds
run: cargo +nightly miri test --verbose --target ${{matrix.platform}} --all-features
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ RUSTFLAGS='--cfg loom' cargo test --release loom
This crate runs successfully with Miri:

```bash
MIRIFLAGS=-Zmiri-symbolic-alignment-check cargo +nightly miri test
MIRIFLAGS='-Zmiri-symbolic-alignment-check -Zmiri-permissive-provenance' cargo +nightly miri test

for SEED in $(seq 0 10); do
echo "Trying seed: $SEED"
MIRIFLAGS="-Zmiri-seed=$SEED" cargo +nightly miri test || { echo "Failing seed: $SEED"; break; };
MIRIFLAGS="-Zmiri-seed=$SEED -Zmiri-permissive-provenance" cargo +nightly miri test || { echo "Failing seed: $SEED"; break; };
done
```

Expand All @@ -132,6 +132,8 @@ cargo +nightly miri test --target i686-unknown-linux-gnu
```

Note: this crate leverages the "exposed provenance" semantics.
`MIRIFLAGS=-Zmiri-permissive-provenance` silences the warning related to the use
of exposed provenance.

## 📦 Similar crates

Expand Down

0 comments on commit 409d442

Please sign in to comment.