blob: 741dd91b35517aacf7df1b930fcf61f385f70a91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
error: Undefined Behavior: in-bounds pointer arithmetic failed: attempting to offset pointer by -$BYTES bytes, but got ALLOC which is at the beginning of the allocation
--> tests/fail/intrinsics/ptr_offset_overflow.rs:LL:CC
|
LL | let x = unsafe { x.offset(isize::MIN) };
| ^^^^^^^^^^^^^^^^^^^^ 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/intrinsics/ptr_offset_overflow.rs:LL:CC
|
LL | let v = [0i8; 4];
| ^
= note: BACKTRACE (of the first span):
= note: inside `main` at tests/fail/intrinsics/ptr_offset_overflow.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
error: aborting due to 1 previous error
|