Skip to content

Commit 0fd757e

Browse files
committed
Auto merge of #919 - RalfJung:wide-raw, r=RalfJung
test for invalid wide raw ptr This is the Miri side of rust-lang/rust#63880.
2 parents ee8afea + 5483531 commit 0fd757e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0444b9f66acb5da23dc816e0d8eb59623ba9ea50
1+
7445622bcb515c822a2fc6e8c57c90478c1a56bb
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fn main() {
2+
trait T { }
3+
#[derive(Debug)]
4+
struct S {
5+
x: * mut dyn T
6+
}
7+
dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); //~ ERROR: encountered dangling or unaligned vtable pointer
8+
}

0 commit comments

Comments
 (0)