-
Notifications
You must be signed in to change notification settings - Fork 6
as_bytes is unsound #6
Copy link
Copy link
Open
Description
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 😕
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels