Skip to content

Commit cf3c6a8

Browse files
authored
Merge pull request #4308 from rust-lang/rustup-2025-05-03
Automatic Rustup
2 parents 1bb7f90 + 8147770 commit cf3c6a8

File tree

67 files changed

+121
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+121
-149
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0c33fe2c3d3eecadd17a84b110bb067288a64f1c
1+
2ad5f8607d0e192b60b130e5cc416b477b351c18

src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ trait EvalContextPrivExt<'tcx, 'ecx>: crate::MiriInterpCxExt<'tcx> {
594594
) -> InterpResult<'tcx, Option<Provenance>> {
595595
let this = self.eval_context_mut();
596596
// Ensure we bail out if the pointer goes out-of-bounds (see miri#1050).
597-
this.check_ptr_access(place.ptr(), size, CheckInAllocMsg::InboundsTest)?;
597+
this.check_ptr_access(place.ptr(), size, CheckInAllocMsg::Dereferenceable)?;
598598

599599
// It is crucial that this gets called on all code paths, to ensure we track tag creation.
600600
let log_creation = |this: &MiriInterpCx<'tcx>,

src/borrow_tracker/tree_borrows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
203203
// Make sure the new permission makes sense as the initial permission of a fresh tag.
204204
assert!(new_perm.initial_state.is_initial());
205205
// Ensure we bail out if the pointer goes out-of-bounds (see miri#1050).
206-
this.check_ptr_access(place.ptr(), ptr_size, CheckInAllocMsg::InboundsTest)?;
206+
this.check_ptr_access(place.ptr(), ptr_size, CheckInAllocMsg::Dereferenceable)?;
207207

208208
// It is crucial that this gets called on all code paths, to ensure we track tag creation.
209209
let log_creation = |this: &MiriInterpCx<'tcx>,

src/intrinsics/simd.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
506506
};
507507

508508
let dest_len = u32::try_from(dest_len).unwrap();
509-
let bitmask_len = u32::try_from(bitmask_len).unwrap();
510509
for i in 0..dest_len {
511510
let bit_i = simd_bitmask_index(i, dest_len, this.data_layout().endian);
512511
let mask = mask & 1u64.strict_shl(bit_i);
@@ -517,17 +516,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
517516
let val = if mask != 0 { yes } else { no };
518517
this.write_immediate(*val, &dest)?;
519518
}
520-
for i in dest_len..bitmask_len {
521-
// If the mask is "padded", ensure that padding is all-zero.
522-
// This deliberately does not use `simd_bitmask_index`; these bits are outside
523-
// the bitmask. It does not matter in which order we check them.
524-
let mask = mask & 1u64.strict_shl(i);
525-
if mask != 0 {
526-
throw_ub_format!(
527-
"a SIMD bitmask less than 8 bits long must be filled with 0s for the remaining bits"
528-
);
529-
}
530-
}
519+
// The remaining bits of the mask are ignored.
531520
}
532521
// Converts a "vector of bool" into a bitmask.
533522
"bitmask" => {

src/shims/unix/android/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn prctl<'tcx>(
4242
ecx.check_ptr_access(
4343
name.to_pointer(ecx)?,
4444
Size::from_bytes(TASK_COMM_LEN),
45-
CheckInAllocMsg::MemoryAccessTest,
45+
CheckInAllocMsg::MemoryAccess,
4646
)?;
4747
let res = ecx.pthread_getname_np(thread, name, len, /* truncate*/ false)?;
4848
assert_eq!(res, ThreadNameResult::Ok);

src/shims/unix/fd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
226226
trace!("Reading from FD {}, size {}", fd_num, count);
227227

228228
// Check that the *entire* buffer is actually valid memory.
229-
this.check_ptr_access(buf, Size::from_bytes(count), CheckInAllocMsg::MemoryAccessTest)?;
229+
this.check_ptr_access(buf, Size::from_bytes(count), CheckInAllocMsg::MemoryAccess)?;
230230

231231
// We cap the number of read bytes to the largest value that we are able to fit in both the
232232
// host's and target's `isize`. This saves us from having to handle overflows later.
@@ -292,7 +292,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
292292
// Isolation check is done via `FileDescription` trait.
293293

294294
// Check that the *entire* buffer is actually valid memory.
295-
this.check_ptr_access(buf, Size::from_bytes(count), CheckInAllocMsg::MemoryAccessTest)?;
295+
this.check_ptr_access(buf, Size::from_bytes(count), CheckInAllocMsg::MemoryAccess)?;
296296

297297
// We cap the number of written bytes to the largest value that we are able to fit in both the
298298
// host's and target's `isize`. This saves us from having to handle overflows later.

tests/fail-dep/libc/affinity.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: memory access failed: expected a pointer to 129 bytes of memory, but got ALLOC which is only 128 bytes from the end of the allocation
1+
error: Undefined Behavior: memory access failed: attempting to access 129 bytes, but got ALLOC which is only 128 bytes from the end of the allocation
22
--> tests/fail-dep/libc/affinity.rs:LL:CC
33
|
44
LL | let err = unsafe { sched_setaffinity(PID, size_of::<cpu_set_t>() + 1, &cpuset) };
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 129 bytes of memory, but got ALLOC which is only 128 bytes from the end of the allocation
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 129 bytes, but got ALLOC which is only 128 bytes from the end of the allocation
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail-dep/libc/memchr_null.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer
1+
error: Undefined Behavior: pointer not dereferenceable: pointer must point to some allocation, but got null pointer
22
--> tests/fail-dep/libc/memchr_null.rs:LL:CC
33
|
44
LL | libc::memchr(ptr::null(), 0, 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got null pointer
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail-dep/libc/memcmp_null.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer
1+
error: Undefined Behavior: pointer not dereferenceable: pointer must point to some allocation, but got null pointer
22
--> tests/fail-dep/libc/memcmp_null.rs:LL:CC
33
|
44
LL | libc::memcmp(ptr::null(), ptr::null(), 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got null pointer
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail-dep/libc/memcmp_zero.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance)
1+
error: Undefined Behavior: pointer not dereferenceable: pointer must point to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance)
22
--> tests/fail-dep/libc/memcmp_zero.rs:LL:CC
33
|
44
LL | libc::memcmp(ptr.cast(), ptr.cast(), 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance)
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance)
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail-dep/libc/memcpy_zero.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got 0x17[noalloc] which is a dangling pointer (it has no provenance)
1+
error: Undefined Behavior: pointer not dereferenceable: pointer must point to some allocation, but got 0x17[noalloc] which is a dangling pointer (it has no provenance)
22
--> tests/fail-dep/libc/memcpy_zero.rs:LL:CC
33
|
44
LL | libc::memcpy(to.cast(), from.cast(), 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got 0x17[noalloc] which is a dangling pointer (it has no provenance)
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got 0x17[noalloc] which is a dangling pointer (it has no provenance)
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail-dep/libc/memrchr_null.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer
1+
error: Undefined Behavior: pointer not dereferenceable: pointer must point to some allocation, but got null pointer
22
--> tests/fail-dep/libc/memrchr_null.rs:LL:CC
33
|
44
LL | libc::memrchr(ptr::null(), 0, 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got null pointer
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/both_borrows/issue-miri-1050-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
3-
//@error-in-other-file: expected a pointer to 4 bytes of memory
3+
//@error-in-other-file: pointer not dereferenceable
44

55
fn main() {
66
unsafe {

tests/fail/both_borrows/issue-miri-1050-1.stack.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got ALLOC which is only 2 bytes from the end of the allocation
1+
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
22
--> RUSTLIB/alloc/src/boxed.rs:LL:CC
33
|
44
LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got ALLOC which is only 2 bytes from the end of the allocation
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 4 bytes, but got ALLOC which is only 2 bytes from the end of the allocation
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/both_borrows/issue-miri-1050-1.tree.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got ALLOC which is only 2 bytes from the end of the allocation
1+
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
22
--> RUSTLIB/alloc/src/boxed.rs:LL:CC
33
|
44
LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got ALLOC which is only 2 bytes from the end of the allocation
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 4 bytes, but got ALLOC which is only 2 bytes from the end of the allocation
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/both_borrows/issue-miri-1050-2.stack.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
1+
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 4 bytes, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
22
--> RUSTLIB/alloc/src/boxed.rs:LL:CC
33
|
44
LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 4 bytes, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/both_borrows/issue-miri-1050-2.tree.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
1+
error: Undefined Behavior: pointer not dereferenceable: pointer must be dereferenceable for 4 bytes, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
22
--> RUSTLIB/alloc/src/boxed.rs:LL:CC
33
|
44
LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must be dereferenceable for 4 bytes, but got 0x4[noalloc] which is a dangling pointer (it has no provenance)
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/dangling_pointers/dangling_pointer_offset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ fn main() {
66
let b = Box::new(42);
77
&*b as *const i32
88
};
9-
let x = unsafe { p.offset(42) }; //~ ERROR: /out-of-bounds pointer arithmetic: .* has been freed/
9+
let x = unsafe { p.offset(42) }; //~ ERROR: /in-bounds pointer arithmetic failed: .* has been freed/
1010
panic!("this should never print: {:?}", x);
1111
}

tests/fail/dangling_pointers/dangling_pointer_offset.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
1+
error: Undefined Behavior: in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
22
--> tests/fail/dangling_pointers/dangling_pointer_offset.rs:LL:CC
33
|
44
LL | let x = unsafe { p.offset(42) };
5-
| ^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
5+
| ^^^^^^^^^^^^ in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ fn main() {
77
&*b as *const i32 as *const (u8, u8, u8, u8)
88
};
99
unsafe {
10-
let _ = (*p).1; //~ ERROR: out-of-bounds pointer arithmetic
10+
let _ = (*p).1; //~ ERROR: in-bounds pointer arithmetic failed
1111
}
1212
}

tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
1+
error: Undefined Behavior: in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
22
--> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.rs:LL:CC
33
|
44
LL | let _ = (*p).1;
5-
| ^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
5+
| ^^^^^^ in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ fn main() {
77
&*b as *const i32 as *const (u8, u8, u8, u8)
88
};
99
unsafe {
10-
let _: u8 = (*p).1; //~ ERROR: out-of-bounds pointer arithmetic
10+
let _: u8 = (*p).1; //~ ERROR: in-bounds pointer arithmetic failed
1111
}
1212
}

tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
1+
error: Undefined Behavior: in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
22
--> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC
33
|
44
LL | let _: u8 = (*p).1;
5-
| ^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
5+
| ^^^^^^ in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
};
99
unsafe {
1010
match (*p).1 {
11-
//~^ ERROR: out-of-bounds pointer arithmetic
11+
//~^ ERROR: in-bounds pointer arithmetic failed
1212
_ => {}
1313
}
1414
}

tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
1+
error: Undefined Behavior: in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
22
--> tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.rs:LL:CC
33
|
44
LL | match (*p).1 {
5-
| ^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling
5+
| ^^^^^^ in-bounds pointer arithmetic failed: ALLOC has been freed, so this pointer is dangling
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

0 commit comments

Comments
 (0)