about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr
blob: c5f6e62b869060de835b5f245c47b25d419368fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

thread 'main' ($TID) panicked at tests/fail/ptr_swap_nonoverlapping.rs:LL:CC:
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

This indicates a bug in the program. This Undefined Behavior check is optional, and cannot be relied on for safety.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
thread caused non-unwinding panic. aborting.
error: abnormal termination: the program aborted execution
  --> RUSTLIB/std/src/panicking.rs:LL:CC
   |
LL |         crate::process::abort();
   |         ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
   |
   = note: BACKTRACE:
   = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
   = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
   = 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
   = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
note: inside `main`
  --> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC
   |
LL |         std::ptr::swap_nonoverlapping(ptr, ptr, 1);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error