-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate struct of wrong size with bitfields #726
Labels
Comments
I investigated a bit, taking this one. |
emilio
added a commit
to emilio/rust-bindgen
that referenced
this issue
Jun 4, 2017
In particular, the "flush the allocation unit" logic is only valid for ms_structs (that is, MSVC). It's slightly annoying to have this different behavior, but it'd work just fine if we'd turn that on for MSVC. This patch doesn't do that, yet at least, and adds tests for all the weird bitfield alignments around. Fixes rust-lang#726 (and another set of hidden issues by the old code).
emilio
added a commit
to emilio/rust-bindgen
that referenced
this issue
Jun 5, 2017
In particular, the "flush the allocation unit" logic is only valid for ms_structs (that is, MSVC). It's slightly annoying to have this different behavior, but it'd work just fine if we'd turn that on for MSVC. This patch doesn't do that, yet at least, and adds tests for all the weird bitfield alignments around. Fixes rust-lang#726 (and another set of hidden issues by the old code).
bors-servo
pushed a commit
that referenced
this issue
Jun 5, 2017
ir: Fix a bunch of bitfield correctness issues. In particular, the "flush the allocation unit" logic is only valid for ms_structs (that is, MSVC). It's slightly annoying to have this different behavior, but it'd work just fine if we'd turn that on for MSVC. This patch doesn't do that, yet at least, and adds tests for all the weird bitfield alignments around. Fixes #726 (and another set of hidden issues by the old code).
tmfink
pushed a commit
to tmfink/rust-bindgen
that referenced
this issue
Jun 10, 2017
In particular, the "flush the allocation unit" logic is only valid for ms_structs (that is, MSVC). It's slightly annoying to have this different behavior, but it'd work just fine if we'd turn that on for MSVC. This patch doesn't do that, yet at least, and adds tests for all the weird bitfield alignments around. Fixes rust-lang#726 (and another set of hidden issues by the old code).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input C/C++ Header
Bindgen Invocation
Actual Results
Which results in the following generated layout test failure:
Expected Results
We generate a struct of size 8, not 9. The generated layout tests pass.
The text was updated successfully, but these errors were encountered: