Skip to content

Commit 3d53cc2

Browse files
committed
Add optional Miri verification
1 parent 656eb0d commit 3d53cc2

5 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- Kept `unsafe_wipe` public helper APIs available for explicit ordinary-buffer
1414
wiping.
1515
- Added a release LLVM IR codegen check for volatile byte-zero stores.
16+
- Added an optional Miri verification script for the wipe boundary and feature
17+
matrix.
1618
- Updated README, safety notes, and threat model for the new clearing model.
1719

1820
## 1.0.0-rc.4

‎Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ include = [
2929
"scripts/checks.sh",
3030
"scripts/ci_install_rust.sh",
3131
"scripts/verify-codegen.sh",
32+
"scripts/verify-miri.sh",
3233
]
3334

3435
[features]

‎README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,13 @@ The check script covers formatting, feature-matrix tests, examples, clippy, docs
366366
with warnings denied, release LLVM IR verification for volatile byte-zero
367367
stores, and package listing.
368368

369+
When a nightly toolchain with Miri is available, run the interpreter-based
370+
unsafe-boundary check separately:
371+
372+
```bash
373+
scripts/verify-miri.sh
374+
```
375+
369376
## Limits
370377

371378
This crate reduces accidental retention and accidental exposure. It does not

‎ROADMAP.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ Implemented now:
118118
- `scripts/verify-codegen.sh` builds release LLVM IR and checks that the wipe
119119
backend contains volatile byte-zero stores.
120120
- `scripts/checks.sh` runs the codegen verification as part of the local gate.
121+
- `scripts/verify-miri.sh` runs default, `alloc`, and all-features tests under
122+
Miri when a nightly toolchain with Miri is available.
121123

122124
Property-based or timing-distribution tests can live outside the published
123125
crate if keeping dev dependencies out of the repository remains preferred.

‎scripts/verify-miri.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
toolchain="${MIRI_TOOLCHAIN:-nightly}"
5+
6+
if ! cargo +"${toolchain}" miri --version >/dev/null 2>&1; then
7+
echo "cargo miri is unavailable for toolchain '${toolchain}'" >&2
8+
echo "install it with: rustup +${toolchain} component add miri" >&2
9+
exit 1
10+
fi
11+
12+
cargo +"${toolchain}" miri test --no-default-features
13+
cargo +"${toolchain}" miri test --features alloc
14+
cargo +"${toolchain}" miri test --all-features

0 commit comments

Comments
 (0)