-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix #29718, union field alignment #29722
Conversation
So is the bug only hit in the case where there were enough fields to require alignment? Or with an unfortunate choice of fields prior to an isbits Union field to cause the misalignment? |
This looks correct, but is a bit more pessimistic than it necessarily needs to be. The only caller that needs the more pessimistic result is |
@quinnj, the correct representation of the type was |
1e6e551
to
0484546
Compare
Better? |
Remove pessimization of MWE can be added to the existing struct UnionField
alignment::Int32
padding::NTuple{3, UInt8}
#= implicit-padding::UInt8 =#
maybe_val::Union{UInt16, Nothing} # offset = 8, align = 8, size = 2
end |
0484546
to
7e61a62
Compare
No description provided.