Skip to content

Provenance for zero-sized accesses? #490

Closed
@joshlf

Description

Is provenance required in order to perform zero-sized accesses? Following up on rust-lang/rust#116677 (comment), I understand that it is sound (e.g. per the ptr module docs) to perform a zero-sized load or store using a pointer derived from any non-zero integer literal. Since integers do not have provenance, this implies that zero-sized accesses do not require valid provenance. Is that correct?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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