[PATCH libXi] Force alignment with sizeof(Atom) for XIButtonClassInfo

Adam Jackson ajax at nwnk.net
Wed Mar 16 09:32:05 PDT 2011


On 3/14/11 9:05 PM, Peter Hutterer wrote:
> The memory layout of an XIButtonClassInfo is
> [struct XIButtonClassInfo][mask][labels]
>
> With the mask being currently 4-byte aligned and labels a list of Atoms. On
> LP64, Atoms are 8 byte, leading to unaligned access for some mask lengths.
> Force the alignment to be sizeof(Atom).
>
> Reported-by: Christian Weisgerber<naddy at mips.inka.de>
> Signed-off-by: Peter Hutterer<peter.hutterer at who-t.net>

Xlib sure is tragic.

Reviewed-by: Adam Jackson <ajax at redhat.com>

- ajax


More information about the xorg-devel mailing list