-
Notifications
You must be signed in to change notification settings - Fork 739
Wrong alignment on vectors #3190
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
rust-bindgen/bindgen-tests/tests/headers/vector.hpp Lines 1 to 3 in 97ab915
rust-bindgen/bindgen-tests/tests/headers/opencl_vector.h Lines 1 to 2 in 97ab915
Could just be an uncaught variant, some of the work done here is only 2 weeks old. |
The issue isn't specific to that syntax; using rust-bindgen/bindgen/codegen/mod.rs Lines 4369 to 4371 in 97ab915
A solution would be to wrap them in a struct to preserve alignment similar to what's being done for opaque arrays rust-bindgen/bindgen/codegen/helpers.rs Lines 105 to 109 in 97ab915
|
Since vectors are defined with type aliases they have an incorrect alignment.
For example this has an alignment of 8
The generated bindgen code is
which has an alignment of 4 instead of the expected 8.
The text was updated successfully, but these errors were encountered: