2022-07-07 19:12:30 -05:00
error: Undefined Behavior: reading memory at ALLOC[0x0..0x10], but memory is uninitialized at [0x4..0x10], and this operation requires initialized memory
2022-05-31 17:23:47 -05:00
--> RUSTLIB/core/src/slice/cmp.rs:LL:CC
|
LL | let mut order = unsafe { memcmp(left.as_ptr(), right.as_ptr(), len) as isize };
2022-07-07 19:12:30 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC[0x0..0x10], but memory is uninitialized at [0x4..0x10], and this operation requires initialized memory
2022-03-17 08:49:10 -05:00
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
2022-08-31 07:51:05 -05:00
= note: BACKTRACE:
2022-05-31 17:23:47 -05:00
= note: inside `<u8 as core::slice::cmp::SliceOrd>::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC
= note: inside `core::slice::cmp::<impl std::cmp::Ord for [u8]>::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC
2022-03-17 08:49:10 -05:00
note: inside `main` at $DIR/uninit_buffer.rs:LL:CC
--> $DIR/uninit_buffer.rs:LL:CC
|
LL | drop(slice1.cmp(slice2));
| ^^^^^^^^^^^^^^^^^^
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
2022-07-07 19:12:30 -05:00
Uninitialized memory occurred at ALLOC[0x4..0x10], in this allocation:
2022-03-17 08:49:10 -05:00
ALLOC (Rust heap, size: 32, align: 8) {
0x00 │ 41 42 43 44 __ __ __ __ __ __ __ __ __ __ __ __ │ ABCD░░░░░░░░░░░░
0x10 │ 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ │ .░░░░░░░░░░░░░░░
}
error: aborting due to previous error