Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5a87074

Browse files
committed
Fix affected MIRI tests by disabling the checks for them
1 parent b51c477 commit 5a87074

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/tools/miri/tests/fail/dangling_pointers/null_pointer_deref.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Enable the UB checks for the sake of this test.
2+
//@compile-flags: -Zub-checks=no
3+
14
#[allow(deref_nullptr)]
25
fn main() {
36
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR: null pointer

src/tools/miri/tests/fail/dangling_pointers/null_pointer_write.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Enable the UB checks for the sake of this test.
2+
//@compile-flags: -Zub-checks=no
3+
14
#[allow(deref_nullptr)]
25
fn main() {
36
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR: null pointer

0 commit comments

Comments
 (0)