Skip to content
Merged
12 changes: 12 additions & 0 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- .github/workflows/miri.yml
- crates/onnx-runtime-ep-api/**
- crates/onnx-runtime-ep-cpu/**
- crates/onnx-runtime-ep-plugin/**
- crates/onnx-runtime-session/**
- crates/onnx-runtime-capi/**
- crates/onnx-runtime-memory/**
Expand All @@ -22,6 +23,7 @@ on:
- .github/workflows/miri.yml
- crates/onnx-runtime-ep-api/**
- crates/onnx-runtime-ep-cpu/**
- crates/onnx-runtime-ep-plugin/**
- crates/onnx-runtime-session/**
- crates/onnx-runtime-capi/**
- crates/onnx-runtime-memory/**
Expand Down Expand Up @@ -198,6 +200,16 @@ jobs:
run_miri "onnx-runtime-ep-cpu dtype" \
cargo +nightly miri test --locked -p onnx-runtime-ep-cpu --lib dtype::tests

# onnx-runtime-ep-plugin marshals ORT `OrtValue`s across the C ABI.
# Since #1246 `read_inputs` borrows the value's *own* shape array
# instead of copying it, and ORT spells a scalar as a null pointer
# with count 0 — `slice::from_raw_parts` on that is UB that no native
# run can observe. Miri is the only thing here that checks the guard,
# so `kernel_ctx::` is covered directly. The rest of the crate dlopens
# ORT and is not Miri-tractable.
run_miri "onnx-runtime-ep-plugin kernel context" \
cargo +nightly miri test --locked -p onnx-runtime-ep-plugin --lib kernel_ctx::

run_miri "onnx-runtime-session tensor" \
env MIRIFLAGS=-Zmiri-disable-isolation cargo +nightly miri test --locked -p onnx-runtime-session --lib tensor::tests
run_miri "onnx-runtime-session sequence" \
Expand Down
2 changes: 1 addition & 1 deletion crates/onnx-runtime-ep-plugin/src/dispatch_probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ mod ffi_coverage {
/// account for it.
const EXPECTED: &[(&str, &str, usize, usize)] = &[
("compute.rs", include_str!("compute.rs"), 9, 9),
("kernel_ctx.rs", include_str!("kernel_ctx.rs"), 11, 11),
("kernel_ctx.rs", include_str!("kernel_ctx.rs"), 12, 12),
("status.rs", include_str!("status.rs"), 1, 1),
("host_pool.rs", include_str!("host_pool.rs"), 2, 2),
];
Expand Down
Loading
Loading