about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr
blob: 9927d90c6469aa33b98d6d4fd183036c93feced9 (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
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 4 bytes, but got ALLOC which is only 2 bytes from the end of the allocation
  --> RUSTLIB/alloc/src/boxed.rs:LL:CC
   |
LL |         Box(unsafe { Unique::new_unchecked(raw) }, alloc)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
   |
   = 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
help: ALLOC was allocated here:
  --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC
   |
LL |         let ptr = Box::into_raw(Box::new(0u16));
   |                                 ^^^^^^^^^^^^^^
   = note: BACKTRACE (of the first span):
   = note: inside `std::boxed::Box::<u32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
   = note: inside `std::boxed::Box::<u32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside `main`
  --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC
   |
LL |         drop(Box::from_raw(ptr as *mut u32));
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

error: aborting due to 1 previous error