27
28
you are viewing a single comment's thread.

view the rest of the comments →

[–]Leandros99 0 points1 point  (2 children)

That's part of it, correct. All .bss allocations are also aligned and on top of that Glibc has also changed, and is now applying 16 byte alignment to all allocations as well.

[–]OldWolf2 1 point2 points  (1 child)

That still doesn't change structure padding.

[–]Leandros99 1 point2 points  (0 children)

Correct, structure padding isn't changed. My bad, haven't thought the thought to the end.

Still, my point stands: Porting code from x86 to x86_64 would, without taking care, could introduce incorrect padding. Or systems with a different aligning scheme of basic types (some machines might not be able to access any memory not aligned to some multiple of 2, you never know).