[Xcb] How to cleanly terminate an xcb connection?

Alan Coopersmith alan.coopersmith at oracle.com
Wed Oct 13 16:23:51 UTC 2021


On 10/13/21 8:20 AM, Uli Schlachter wrote:
>> PS I also get an error during start up:
> [...]
>> Really strange :/ Why would xcb_flush send uninitialized data over the socket?
> 
> No idea, but you could try adding more calls to xcb_flush() in your code
> to narrow down which request sending causes this.
> 
> A random example on how this can happen: The Qt code above uses
> memset(&event, 0, sizeof(event)) on an xcb_client_message_event_t before
> sending this event. If you don't do that, you might end up sending
> uninitialised data.
> 
> I am not saying that libxcb does not cause this, but at least I'd be
> surprised about this. Most likely something tells libxcb to send some
> uninitialised bytes to the X11 server.

It could also be that the requests include some padding bytes that never
get filled in before being sent to the server:
https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/32


-- 
	-Alan Coopersmith-               alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - https://blogs.oracle.com/alanc


More information about the Xcb mailing list