Skip to content

Report null fat raw pointers #918

Closed
rust-lang/rust
#63880
@nico-abram

Description

@nico-abram

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

No one assigned

    Labels

    A-validationArea: This affects enforcing the validity invariant, and related UB checkingC-supportCategory: Not necessarily a bug, but someone asking for supportI-misses-UBImpact: makes Miri miss UB, i.e., a false negative (with default settings)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions