Skip to content

as_bytes is unsound #6

Description

@andrewhickman

It is unsafe to view an arbitrary type as bytes because it might contain uninitialized padding bytes.

zerocopy solves this with a derive macro but it is a bit limited (it doesn't work with generics, and implementing it manually is discouraged)

Unfortunately many types in this crate have padding, so there isn't really a great alternative 😕

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions