[Xcb] Ungrabserver() creates I/O error vs. XCloseDisplay() triggers assert in LSB test case

Barton C Massey bart at cs.pdx.edu
Fri Dec 14 14:31:42 PST 2007


In message <20071214193603.GA14919 at suse.de> you wrote:
> For a full description see https://bugzilla.novell.com/show_bug.cgi?id=302173
> Including the test program.

The assertion is triggered by a known bug in the X Test
Suite, which is replicated throughout that codebase.

When XOpenDisplay() is called in the parent process for the
resulting display structure to be used in the child process,
bad things can happen if the parent also tries to use that
structure.  (The fork() system call makes a copy of the
display structure; the parent is operating on the unmodified
version, so the display structure is out of sync with
respect to the connection fd.)  This matters to XCB a lot,
because it has its own stuff on the side, and so it checks
for this with an assertion.  It's just a coincidence that it
works even in Xlib, though.

I cleaned the test code up a bit and the assertion failure
disapppeared.  I'll keep poking at this, and post a fixed
test here when I'm done.

	Bart


More information about the Xcb mailing list