Skip to content

Incorrect bitstream length #3238

Description

@wdouglass

See the attached rust crate, which generates a binding for a simple structure in a c99 h file.

When the cargo build command is run, build.rs generates a binding file, which is included in lib.rs

the binding file creates struct resource which has two bitfields. the second is

    pub _bitfield_2: __BindgenBitfieldUnit<[u8; 7usize]>,

i believe that bitfield should be 6 bytes wide (containing struct members r, s, t, u, v, w, x, y, and z, and totaling 48 bits). that bitfield is 7 bytes wide which causes the build to fail. is this a bug in bindgen or have i missed something?

Thank you for your attention.

bindgenbug.zip

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