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
It doesn't look to me that we have a problem: sizeof(MyStruct) is always greater than or equal to offsetof(MyStruct, z), so, in the worst case, we just waste the padding bytes.
We are doing allocation of structs with flexible array members wrong. It should be:
See https://github.com/postgres/postgres/blob/master/src/include/c.h#L342-L350.
The reason is that padding may give a different array start location compared to
sizeof
.The above prints:
The text was updated successfully, but these errors were encountered: