[PATCH libX11 0/2] Xlib 32-bit sequence number wrap bug(fix)

Keith Packard keithp at keithp.com
Sun Nov 17 00:26:11 PST 2013


Jonas Petersen <jnsptrsn1 at gmail.com> writes:

> It might take one or two hours, but when it reaches the 4294 million it will 
> explode into a "Fatal IO error 11".

This reproduces the bug in about 15 minutes on my machine:

/* cc -o nop nop.c `pkg-config --cflags --libs x11` */
#include    <stdio.h>
#include    <stdint.h>
#include    <X11/Xlib.h>

int
main (int argc, char **argv)
{
	uint64_t	i = 0;
	Display *dpy = XOpenDisplay(NULL);

	for (;;) {
		++i;
		if ((i & 0xfffffff) == 0) {
			XFlush(dpy);
			printf ("0x%llx\n", i);
		}
		XNoOp(dpy);
	}
}

-- 
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.x.org/archives/xorg-devel/attachments/20131117/28313397/attachment.pgp>


More information about the xorg-devel mailing list