-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Rust Push::alignment Incorrect for Structs #8150
Comments
@CasperN perhaps you have some thoughts on this? |
@tustvold btw, meanwhile based on your findings, I did a "hack" in flatbuffer create_vector/create_vector_from_iter and changed the alignment to 8. |
So the codegen in the official Rust backend is generating code that produces wrong data (probably coming from misunderstanding of Rust alignment rules) and none of the maintainers care? |
This issue is stale because it has been open 6 months with no activity. Please comment or label |
This is still an issue, adding a comment to avoid closure of this problem. |
Consider a struct of the form
The following code is generated for
Push
This therefore uses the default impl of
Push::alignment
which isUnfortunately the definition of
FieldNode
isWhich has an alignment of 1.
The net result is that the writer does not provide the correct alignment guarantees for structs, which causes the verifiers of some implementations to fail - apache/arrow-rs#5052.
The text was updated successfully, but these errors were encountered: