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

Jonas Petersen jnsptrsn1 at gmail.com
Sun Nov 17 07:08:42 PST 2013


Am 17.11.2013 09:26, schrieb Keith Packard:
> 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);
> 	}
> }
>

Great, thanks! I was spending some time to find a way to reproduce it as 
fast as possible. Haven't thought of XNoOp. I get it in 25 minutes now. 
The fastest I got before was 70 minutes.

- Jonas


More information about the xorg-devel mailing list