-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
rust-lang/rust
#63880Labels
A-validationArea: This affects enforcing the validity invariant, and related UB checkingArea: This affects enforcing the validity invariant, and related UB checkingC-supportCategory: Not necessarily a bug, but someone asking for supportCategory: Not necessarily a bug, but someone asking for supportI-misses-UBImpact: makes Miri miss UB, i.e., a false negative (with default settings)Impact: makes Miri miss UB, i.e., a false negative (with default settings)
Description
https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=37f152716318de72dd678cb4b8906257
As far as I know, this example is ub. I doubt
detecting this is very important since either zeroed or transmute are probably the only way to do this, and it seems to be as insta ub as setting a reference to null (since the vtable ptr Is NonNull iirc) so i doubt any working code does it.
Metadata
Metadata
Assignees
Labels
A-validationArea: This affects enforcing the validity invariant, and related UB checkingArea: This affects enforcing the validity invariant, and related UB checkingC-supportCategory: Not necessarily a bug, but someone asking for supportCategory: Not necessarily a bug, but someone asking for supportI-misses-UBImpact: makes Miri miss UB, i.e., a false negative (with default settings)Impact: makes Miri miss UB, i.e., a false negative (with default settings)