Skip to content

Commit 3e4ad36

Browse files
committed
Auto merge of #1752 - RalfJung:rustup, r=RalfJung
rustup Just making sure that rust-lang/rust#83445 indeed fixed our cron job failures.
2 parents 91aeb04 + 585e51a commit 3e4ad36

9 files changed

+23
-3
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5d04957a4b4714f71d38326fc96a0b0ef6dc5800
1+
372afcf93bf60e1a9334b107cc3d72f1b0a4b1f4

tests/compile-fail/dangling_pointers/dangling_zst_deref.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Make sure we find these even with many checks disabled.
2-
// compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
2+
// Some optimizations remove ZST accesses, thus masking this UB.
3+
// compile-flags: -Zmir-opt-level=0 -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
34

45
fn main() {
56
let p = {

tests/compile-fail/dangling_pointers/maybe_null_pointer_deref_zst.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Some optimizations remove ZST accesses, thus masking this UB.
2+
// compile-flags: -Zmir-opt-level=0
3+
14
fn main() {
25
// This pointer *could* be NULL so we cannot load from it, not even at ZST
36
let ptr = (&0u8 as *const u8).wrapping_sub(0x800) as *const ();

tests/compile-fail/dangling_pointers/maybe_null_pointer_write_zst.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Some optimizations remove ZST accesses, thus masking this UB.
2+
// compile-flags: -Zmir-opt-level=0
3+
14
fn main() {
25
// This pointer *could* be NULL so we cannot load from it, not even at ZST.
36
// Not using the () type here, as writes of that type do not even have MIR generated.

tests/compile-fail/null_pointer_deref_zst.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Some optimizations remove ZST accesses, thus masking this UB.
2+
// compile-flags: -Zmir-opt-level=0
3+
14
fn main() {
25
let x: () = unsafe { *std::ptr::null() }; //~ ERROR memory access failed: 0x0 is not a valid pointer
36
panic!("this should never print: {:?}", x);

tests/compile-fail/null_pointer_write_zst.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Some optimizations remove ZST accesses, thus masking this UB.
2+
// compile-flags: -Zmir-opt-level=0
3+
14
fn main() {
25
// Not using the () type here, as writes of that type do not even have MIR generated.
36
// Also not assigning directly as that's array initialization, not assignment.

tests/compile-fail/unaligned_pointers/unaligned_ptr_zst.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// This should fail even without validation
2-
// compile-flags: -Zmiri-disable-validation
2+
// Some optimizations remove ZST accesses, thus masking this UB.
3+
// compile-flags: -Zmir-opt-level=0 -Zmiri-disable-validation
34

45
fn main() {
56
for i in 0..10 { // Try many times as this might work by chance.

tests/compile-fail/zst2.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Some optimizations remove ZST accesses, thus masking this UB.
2+
// compile-flags: -Zmir-opt-level=0
3+
14
fn main() {
25
// Not using the () type here, as writes of that type do not even have MIR generated.
36
// Also not assigning directly as that's array initialization, not assignment.

tests/compile-fail/zst3.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Some optimizations remove ZST accesses, thus masking this UB.
2+
// compile-flags: -Zmir-opt-level=0
3+
14
fn main() {
25
// Not using the () type here, as writes of that type do not even have MIR generated.
36
// Also not assigning directly as that's array initialization, not assignment.

0 commit comments

Comments
 (0)