Auto merge of #919 - RalfJung:wide-raw, r=RalfJung

test for invalid wide raw ptr

This is the Miri side of https://github.com/rust-lang/rust/pull/63880.
This commit is contained in:
bors 2019-08-29 15:20:36 +00:00
commit 0fd757ea09
2 changed files with 9 additions and 1 deletions

View file

@ -1 +1 @@
0444b9f66acb5da23dc816e0d8eb59623ba9ea50
7445622bcb515c822a2fc6e8c57c90478c1a56bb

View file

@ -0,0 +1,8 @@
fn main() {
trait T { }
#[derive(Debug)]
struct S {
x: * mut dyn T
}
dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); //~ ERROR: encountered dangling or unaligned vtable pointer
}