You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread 'main' panicked at RUSTLIB/core/src/panicking.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
+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
5
+
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6
+
thread caused non-unwinding panic. aborting.
7
+
error: abnormal termination: the program aborted execution
8
+
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
9
+
|
10
+
LL | ABORT();
11
+
| ^ the program aborted execution
12
+
|
13
+
= note: BACKTRACE:
14
+
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
15
+
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
16
+
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
17
+
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
18
+
= note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC
19
+
= note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC
20
+
= note: inside `std::ptr::swap_nonoverlapping::precondition_check` at RUSTLIB/core/src/ub_checks.rs:LL:CC
21
+
= note: inside `std::ptr::swap_nonoverlapping::<usize>` at RUSTLIB/core/src/ub_checks.rs:LL:CC
22
+
note: inside `main`
23
+
--> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC
24
+
|
25
+
LL | std::ptr::swap_nonoverlapping(ptr, ptr, 1);
26
+
| ^
27
+
28
+
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
0 commit comments