Skip to content

miri doesn't catch a violation of &mut [u8]'s validity invariants #1762

Closed
@anp

Description

@anp

I think miri should fail on https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a79f547a85d6d09e52756c2da3c121f4 because it produces an invalid &mut [u8] on line 11 (see context for reference interpretation).

Should it be an error to produce a &mut [u8] that references uninit bytes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions