[Xcb] XGE malloc bug - too small due to xcb struct padding

Keith Packard keithp at keithp.com
Sun Dec 29 09:34:14 PST 2013


Mark Kettenis <mark.kettenis at xs4all.nl> writes:

> Looks like the logic for inserting the extra "full_sequence" field is
> busted.  To support 64-bit fields in the "extended part" of the event,
> we need 32 bits of padding after the "full_sequence" member.  That
> padding also needs to be added to xcb_generic_event_t to make sure
> that xcb_in.c:read_packet() puts the XGE event data in the right spot.

I suspect this is the best plan at this point; it will break ABI for
existing 32-bit XCB implementations, but as that could never have worked
on 64-bit systems, I'm not sure it matters that much. And, using 32 bits
of padding instead of a 64 bit value for the full sequence will preserve
ABI for applications not using large XGE structures.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20131229/39fd26a2/attachment.pgp>


More information about the Xcb mailing list