libX11: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 2 14:12:37 UTC 2022


 include/X11/Xlibint.h |    1 +
 src/ChkIfEv.c         |    3 +++
 src/IfEvent.c         |    2 ++
 src/OpenDis.c         |    1 +
 src/PeekIfEv.c        |    2 ++
 src/locking.c         |   30 ++++++++++++++++++++++++++++++
 6 files changed, 39 insertions(+)

New commits:
commit 79775575418fd6f8ee1c5e5bbe403df4606fb5b6
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Aug 5 15:19:08 2022 -0400

    Allow X*IfEvent() to reenter libX11
    
    The documentation for this family of functions very clearly says not to
    call into xlib in your predicate function, but historically single
    threaded apps could get away with it just fine, and now that we've
    forced thread-safety on the world such apps will now deadlock instead.
    That's not an acceptable regression even if the app is technically
    broken. This has been reported with XFCE and FVWM, and Motif's
    cut-and-paste code has the same bug by inspection, so this does need to
    be addressed.
    
    This change nerfs LockDisplay/UnlockDisplay while inside the critical
    bit of an IfEvent function. This is still safe in the sense that the
    display remains locked and no other thread should be able to change it
    from under us, but the loop that scans the event queue might not be
    robust against it being modified as a side effect of protocol emitted by
    the predicate callback. But that's not new, non-XInitThreads'd xlib
    would have the same caveat.
    
    Closes: xorg/lib/libx11#157



More information about the xorg-commit mailing list