Skip to content

Commit ae8af35

Browse files
committed
Bless a Miri test
1 parent aeba253 commit ae8af35

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

2-
thread 'main' ($TID) panicked at tests/fail/ptr_swap_nonoverlapping.rs:LL:CC:
3-
unsafe precondition(s) violated: ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap
4-
5-
This indicates a bug in the program. This Undefined Behavior check is optional, and cannot be relied on for safety.
2+
thread 'main' ($TID) panicked at RUSTLIB/core/src/ptr/mod.rs:LL:CC:
3+
ptr::swap_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap (x:$HEX, y:$HEX, size:8, align:8, count:1)
64
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
75
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
86
thread caused non-unwinding panic. aborting.
@@ -17,6 +15,7 @@ LL | crate::process::abort();
1715
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
1816
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
1917
= note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
18+
= note: inside `std::ptr::swap_nonoverlapping::precondition_check::runtime` at RUSTLIB/core/src/ub_checks.rs:LL:CC
2019
note: inside `main`
2120
--> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC
2221
|

0 commit comments

Comments
 (0)