rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.17k stars 320 forks source link

Wide pointer metadata validity: check that the vtable is for the right trait #3497

Closed RalfJung closed 2 months ago

RalfJung commented 2 months ago

With https://github.com/rust-lang/rust/pull/123572, rustc started assuming for UB purposes that a vtable pointer points to a vtabe that's sufficiently big for the given trait. Miri currently isn't able to check that UB.