Skip to content

Commit be1ffc3

Browse files
authored
Merge pull request #4590 from rust-lang/rustup-2025-09-17
Automatic Rustup
2 parents a4a9eb4 + 577b0cd commit be1ffc3

13 files changed

+64
-8
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9d82de19dfae60e55c291f5f28e28cfc2c1b9630
1+
3f1552a273e43e15f6ed240d00e1efdd6a53e65e

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//@revisions: stack tree
2+
// Ensure this even hits the aliasing model
3+
//@compile-flags: -Zmiri-disable-validation
24
//@[tree]compile-flags: -Zmiri-tree-borrows
35
//@error-in-other-file: pointer not dereferenceable
46

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//@revisions: stack tree
2+
// Ensure this even hits the aliasing model
3+
//@compile-flags: -Zmiri-disable-validation
24
//@[tree]compile-flags: -Zmiri-tree-borrows
35
//@error-in-other-file: is a dangling pointer
46
use std::ptr::NonNull;

tests/fail/both_borrows/return_invalid_shr.stack.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x4..0x8]
1111
|
1212
LL | let ret = unsafe { &(*xraw).1 };
1313
| ^^^^^^^^^^
14-
help: <TAG> was later invalidated at offsets [0x0..0x8] by a write access
14+
help: <TAG> was later invalidated at offsets [0x4..0x8] by a write access
1515
--> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC
1616
|
1717
LL | unsafe { *xraw = (42, 23) }; // unfreeze

tests/fail/both_borrows/return_invalid_shr.tree.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ help: the accessed tag <TAG> was created here, in the initial state Frozen
1212
|
1313
LL | let ret = unsafe { &(*xraw).1 };
1414
| ^^^^^^^^^^
15-
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8]
15+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8]
1616
--> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC
1717
|
1818
LL | unsafe { *xraw = (42, 23) }; // unfreeze

tests/fail/both_borrows/return_invalid_shr_option.stack.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x4..0x8]
1414
|
1515
LL | let ret = Some(unsafe { &(*xraw).1 });
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
17-
help: <TAG> was later invalidated at offsets [0x0..0x8] by a write access
17+
help: <TAG> was later invalidated at offsets [0x4..0x8] by a write access
1818
--> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC
1919
|
2020
LL | unsafe { *xraw = (42, 23) }; // unfreeze

tests/fail/both_borrows/return_invalid_shr_option.tree.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ help: the accessed tag <TAG> was created here, in the initial state Frozen
1212
|
1313
LL | let ret = Some(unsafe { &(*xraw).1 });
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15-
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8]
15+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8]
1616
--> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC
1717
|
1818
LL | unsafe { *xraw = (42, 23) }; // unfreeze

tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x4..0x8]
1414
|
1515
LL | let ret = (unsafe { &(*xraw).1 },);
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^
17-
help: <TAG> was later invalidated at offsets [0x0..0x8] by a write access
17+
help: <TAG> was later invalidated at offsets [0x4..0x8] by a write access
1818
--> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC
1919
|
2020
LL | unsafe { *xraw = (42, 23) }; // unfreeze

tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ help: the accessed tag <TAG> was created here, in the initial state Frozen
1212
|
1313
LL | let ret = (unsafe { &(*xraw).1 },);
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^
15-
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8]
15+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8]
1616
--> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC
1717
|
1818
LL | unsafe { *xraw = (42, 23) }; // unfreeze
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//! This is like `pass/overlapping_assignment_aggregate_scalar.rs` but with a non-scalar
2+
//! type, and that makes it definite UB.
3+
#![feature(custom_mir, core_intrinsics)]
4+
#![allow(internal_features)]
5+
6+
use std::intrinsics::mir::*;
7+
8+
#[custom_mir(dialect = "runtime")]
9+
fn main() {
10+
mir! {
11+
let _1: ([u8; 1],);
12+
{
13+
_1.0 = [0_u8; 1];
14+
_1 = (_1.0, ); //~ERROR: overlapping ranges
15+
Return()
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)