-
Notifications
You must be signed in to change notification settings - Fork 323
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
Accesses to fields with packed type fail alignment check #352
Comments
In the mean time, I learned that |
The following function fails to execute in miri, raising an alignment error:
The problem is that the 2nd field of
Outer
is unaligned because it's type isrepr(packed)
. This came as a surprise to me, I thoughtrepr(packed)
would only influence the layout within this type, not the layout of other types that just involve this type.How far does this go? For example, if I have a local of type
Inner
, do I even still have alignment guarantees for that local?(It is amazing how much time I spend thinking about alignment problems in miri, and how many problems there are. Why is this all so complicated?!?)
The text was updated successfully, but these errors were encountered: