|
| 1 | +error: any use of this value will cause an error |
| 2 | + --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
| 3 | + | |
| 4 | +LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | | |
| 7 | + | memory access failed: pointer must be in-bounds at offset 8, but is outside bounds of alloc6 which has size 4 |
| 8 | + | inside `std::ptr::read::<u32>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
| 9 | + | inside `_READ` at $DIR/out_of_bounds_read.rs:13:33 |
| 10 | + | |
| 11 | + ::: $DIR/out_of_bounds_read.rs:13:5 |
| 12 | + | |
| 13 | +LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) }; |
| 14 | + | ------------------------------------------------------ |
| 15 | + | |
| 16 | + = note: `#[deny(const_err)]` on by default |
| 17 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 18 | + = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> |
| 19 | + |
| 20 | +error: any use of this value will cause an error |
| 21 | + --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
| 22 | + | |
| 23 | +LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); |
| 24 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 25 | + | | |
| 26 | + | memory access failed: pointer must be in-bounds at offset 8, but is outside bounds of alloc6 which has size 4 |
| 27 | + | inside `std::ptr::read::<u32>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
| 28 | + | inside `ptr::const_ptr::<impl *const u32>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL |
| 29 | + | inside `_CONST_READ` at $DIR/out_of_bounds_read.rs:14:39 |
| 30 | + | |
| 31 | + ::: $DIR/out_of_bounds_read.rs:14:5 |
| 32 | + | |
| 33 | +LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() }; |
| 34 | + | -------------------------------------------------------- |
| 35 | + | |
| 36 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 37 | + = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> |
| 38 | + |
| 39 | +error: any use of this value will cause an error |
| 40 | + --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
| 41 | + | |
| 42 | +LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); |
| 43 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | + | | |
| 45 | + | memory access failed: pointer must be in-bounds at offset 8, but is outside bounds of alloc6 which has size 4 |
| 46 | + | inside `std::ptr::read::<u32>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL |
| 47 | + | inside `ptr::mut_ptr::<impl *mut u32>::read` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL |
| 48 | + | inside `_MUT_READ` at $DIR/out_of_bounds_read.rs:15:37 |
| 49 | + | |
| 50 | + ::: $DIR/out_of_bounds_read.rs:15:5 |
| 51 | + | |
| 52 | +LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() }; |
| 53 | + | -------------------------------------------------------------------- |
| 54 | + | |
| 55 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
| 56 | + = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> |
| 57 | + |
| 58 | +error: aborting due to 3 previous errors |
| 59 | + |
0 commit comments