-
Notifications
You must be signed in to change notification settings - Fork 739
Subtract underflow when generating explicit paddings #2695
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
Comments
yshui
pushed a commit
to yshui/rust-bindgen
that referenced
this issue
Dec 12, 2023
yshui
added a commit
to yshui/rust-bindgen
that referenced
this issue
Dec 12, 2023
And padding is not generated for packed layout with align > 1, I will open another bug after this is fixed. |
yshui
added a commit
to yshui/rust-bindgen
that referenced
this issue
Jan 12, 2024
yshui
added a commit
to yshui/rust-bindgen
that referenced
this issue
Jan 12, 2024
emilio
pushed a commit
that referenced
this issue
Jan 12, 2024
emilio
pushed a commit
that referenced
this issue
Jan 12, 2024
This should probably still be open; affects me on 0.71.1. |
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
Analysis
The reason this happens is because in
saw_field_with_layout
, padding bytes size is always calculated using the specified pack alignment, i.e. 2 bytes. however, if the field itself has a smaller alignment requirement, that should be used instead.The text was updated successfully, but these errors were encountered: