1 error[E0080]: evaluation of constant value failed
2 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
4 LL | unsafe { copy_nonoverlapping(src, dst, count) }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 | memory access failed: alloc7 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
8 | inside `copy_nonoverlapping::<u32>` at $SRC_DIR/core/src/intrinsics.rs:LL:COL
10 ::: $SRC_DIR/core/src/ptr/mod.rs:LL:COL
12 LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
13 | --------------------------------------------- inside `std::ptr::read::<u32>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
15 ::: $DIR/out_of_bounds_read.rs:13:33
17 LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
18 | ----------------------- inside `_READ` at $DIR/out_of_bounds_read.rs:13:33
20 error[E0080]: evaluation of constant value failed
21 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
23 LL | unsafe { copy_nonoverlapping(src, dst, count) }
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | memory access failed: alloc7 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
27 | inside `copy_nonoverlapping::<u32>` at $SRC_DIR/core/src/intrinsics.rs:LL:COL
29 ::: $SRC_DIR/core/src/ptr/mod.rs:LL:COL
31 LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
32 | --------------------------------------------- inside `std::ptr::read::<u32>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
34 ::: $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
36 LL | unsafe { read(self) }
37 | ---------- inside `ptr::const_ptr::<impl *const u32>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
39 ::: $DIR/out_of_bounds_read.rs:14:39
41 LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
42 | ------------------- inside `_CONST_READ` at $DIR/out_of_bounds_read.rs:14:39
44 error[E0080]: evaluation of constant value failed
45 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
47 LL | unsafe { copy_nonoverlapping(src, dst, count) }
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 | memory access failed: alloc7 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
51 | inside `copy_nonoverlapping::<u32>` at $SRC_DIR/core/src/intrinsics.rs:LL:COL
53 ::: $SRC_DIR/core/src/ptr/mod.rs:LL:COL
55 LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
56 | --------------------------------------------- inside `std::ptr::read::<u32>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
58 ::: $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
60 LL | unsafe { read(self) }
61 | ---------- inside `ptr::mut_ptr::<impl *mut u32>::read` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
63 ::: $DIR/out_of_bounds_read.rs:15:37
65 LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
66 | --------------------------------- inside `_MUT_READ` at $DIR/out_of_bounds_read.rs:15:37
68 error: aborting due to 3 previous errors
70 For more information about this error, try `rustc --explain E0080`.