Skip to content

derive(IntoBytes) accepts enums with padding #3067

@jswrenn

Description

@jswrenn

derive(IntoBytes) erroneously accepts repr(C/int, align(X)) enums with static padding; e.g.

#[derive(zerocopy::IntoBytes)]
#[repr(u8, align(2))]
enum HasAlign {
    A
}

Fix in progress in #3064. Bug confirmed to be present as far back as 0.7.35 (the earliest un-yanked version of zerocopy in the 0.7 train).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions