]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/uninit_buffer.stderr
Add a custom ui test runner and move all tests to it
[rust.git] / tests / compile-fail / uninit_buffer.stderr
1 error: Undefined Behavior: reading 16 bytes of memory starting at ALLOC, but 12 bytes are uninitialized starting at ALLOC+0x4, and this operation requires initialized memory
2    |
3    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
4    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
5            
6    = note: inside `<u8 as core::slice::cmp::SliceOrd>::compare` at rustc_src/src/slice/cmp.rs:LL:CC
7    = note: inside `core::slice::cmp::<impl std::cmp::Ord for [u8]>::cmp` at rustc_src/src/slice/cmp.rs:LL:CC
8 note: inside `main` at $DIR/uninit_buffer.rs:LL:CC
9   --> $DIR/uninit_buffer.rs:LL:CC
10    |
11 LL |         drop(slice1.cmp(slice2));
12    |              ^^^^^^^^^^^^^^^^^^
13
14 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
15
16 Uninitialized read occurred at offsets 0x4..0x10 into this allocation:
17 ALLOC (Rust heap, size: 32, align: 8) {
18     0x00 │ 41 42 43 44 __ __ __ __ __ __ __ __ __ __ __ __ │ ABCD░░░░░░░░░░░░
19     0x10 │ 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ │ .░░░░░░░░░░░░░░░
20 }
21
22 error: aborting due to previous error
23