Skip to content

Commit 3456f77

Browse files
committed
Update MIRI compiletests
1 parent 5292d48 commit 3456f77

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fn main() {
77
// Also not assigning directly as that's array initialization, not assignment.
88
let zst_val = [1u8; 0];
99
unsafe { std::ptr::null_mut::<[u8; 0]>().write(zst_val) };
10-
//~^ERROR: memory access failed: null pointer is a dangling pointer
10+
//~^ERROR: dereferencing pointer failed: null pointer is a dangling pointer
1111
}

src/tools/miri/tests/fail/dangling_pointers/null_pointer_write_zst.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: memory access failed: null pointer is a dangling pointer (it has no provenance)
1+
error: Undefined Behavior: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
22
--> $DIR/null_pointer_write_zst.rs:LL:CC
33
|
44
LL | unsafe { std::ptr::null_mut::<[u8; 0]>().write(zst_val) };
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: null pointer is a dangling pointer (it has no provenance)
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer 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

0 commit comments

Comments
 (0)