You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have defined below packed struct. There are 14 'bool' fields and u18 padding field. I was expecting @sizeof(RESOURCE_STATES) to be 4. Unfortunately @sizeof(RESOURCE_STATES) is 5.
Packed structs are currently a bit broken unfortunately. The issues to watch about this are #2627 and #3133
andrewrk
added
bug
Observed behavior contradicts documented or intended behavior
stage1
The process of building from source via WebAssembly and the C backend.
labels
Oct 4, 2020
I have defined below packed struct. There are 14 'bool' fields and u18 padding field. I was expecting @sizeof(RESOURCE_STATES) to be 4. Unfortunately @sizeof(RESOURCE_STATES) is 5.
The same technique but for smaller structs works as expected:
@sizeof(HEAP_FLAGS) == 4.
As a workaround I have to define 18 'bool' padding fields in RESOURCE_STATES struct.
Thanks,
Michal
The text was updated successfully, but these errors were encountered: