summaryrefslogtreecommitdiff
path: root/tests/headers/explicit-padding.h
AgeCommit message (Collapse)Author
2022-10-04split the repo into a workspaceChristian Poveda
remove `clap` dependency :tada: update the book installation instructions
2021-10-27Don't generate 2^64 byte padding fields on unionsTheodore Dubois
The --explicit-padding flag would make bindgen try to add tail padding to rust unions, by adding up the size of all the union fields and subtracting from the size of the union as given by clang. The total size of a union's fields is always larger than the union, so the subtraction underflowed and bindgen produced padding fields larger than addressable RAM.
2021-07-16Allow explicit padding (#2060)Eric Seppanen
If a struct needs to be serialized in its native format (padding bytes and all), for example writing it to a file or sending it on the network, then explicit padding fields are necessary, as anything reading the padding bytes of a struct may lead to Undefined Behavior.