[Xcb] [Bug 23192] racy access to dpy->synchandler in libX11 >= 1.1.99.2

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 15 11:24:52 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=23192

--- Comment #5 from Josh Triplett <josh at freedesktop.org> 2010-04-15 11:24:51 PDT ---
OK.  Jamey and I have a plan to solve this now.

In the XTHREADS case, after you've called XInitThreads, we can hook LockDisplay
and UnlockDisplay.  We can use that to run _XIDHandler and _XSeqSyncHandler
from LockDisplay rather than SyncHandle; we then know that we hold the lock,
and thus we can prevent the race.  We think it makes sense to do these both
from LockDisplay rather than UnlockDisplay, so that you know you have valid
sync and a valid XID before you start setting up the request you locked to
prepare.

In the !XTHREADS case, or if you haven't called XInitThreads, you don't get to
use Xlib from multiple threads, so we can use the logic we have now (with
synchandler and savedsynchandler) without any concern about races.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Xcb mailing list