1. 07 May, 2020 4 commits
  2. 22 Dec, 2018 2 commits
  3. 22 Oct, 2018 1 commit
  4. 25 Aug, 2017 1 commit
  5. 26 Mar, 2017 1 commit
    • Arthur Huillet's avatar
      _XDefaultError: set XlibDisplayIOError flag before calling exit · 00405b27
      Arthur Huillet authored
      _XReply isn't reentrant, and it can lead to deadlocks when the default error
      handler is called: _XDefaultError calls exit(1). It is called indirectly by
      _XReply when a X protocol error comes in that isn't filtered/handled by an
      extension or the application. This means that if the application (or one of its
      loaded shared libraries such as the NVIDIA OpenGL driver) has registered any
      _fini destructor, _fini will get called while still on the call stack of
      _XReply. If the destructor interacts with the X server and calls _XReply, it
      will hit a deadlock, looping on the following in _XReply:
      
          ConditionWait(dpy, dpy->xcb->reply_notify);
      
      It is legal for an application to make Xlib calls during _fini, and that is
      useful for an OpenGL driver to avoid resource leaks on the X server side, for
      example in the dlopen/dlclose case. However, the driver can not readily tell
      whether its _fini is being called because Xlib called exit, or for another
      reason (dlclose), so it is hard to cleanly work around this issue in the driver.
      
      This change makes it so _XReply effectively becomes a no-op when called after
      _XDefaultError was called, as though an XIOError had happened. The dpy
      connection isn't broken at that point, but any call to _XReply is going to hang.
      This is a bit of a kludge, because the more correct solution would be to make
      _XReply reentrant, maybe by broadcasting the reply_notify condition before
      calling the default error handler. However, such a change would carry a grater
      risk of introducing regressions in Xlib.
      
      This change will drop some valid requests on the floor, but this should not
      matter, as it will only do so in the case where the application is dying: X will
      clean up after it once exit() is done running. There is the case of
      XSetCloseDownMode(RETAIN_PERMANENT), but an application using that and wishing
      to clean up resources in _fini would currently be hitting a deadlock, which is
      hardly a better situation.
      Signed-off-by: 's avatarAaron Plattner <aplattner@nvidia.com>
      Reviewed-by: 's avatarJamey Sharp <jamey@minilop.net>
      00405b27
  6. 01 Mar, 2017 4 commits
  7. 08 Feb, 2017 4 commits
  8. 20 Oct, 2016 2 commits
    • walter harms's avatar
      Fixes: warning: variable 'req' set but not,used · ddc5ed4c
      walter harms authored
      Fixes: warning: variable 'req' set but not used [-Wunused-but-set-variable]
             by marking req _X_UNUSED
      	Solution was discussed on xorg-devel ML
             Peter Hutter, Alan Coopersmith
              Re: [PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign]
      
      Signed-off-by: harms wharms@bfs.de
      ddc5ed4c
    • Ulrich Sibiller's avatar
      Fix warnings in XlibInt.c · 2c59fbe3
      Ulrich Sibiller authored
      XlibInt.c: In function ‘_XIOError’:
      XlibInt.c:3750:1: warning: ‘noreturn’ function does return [enabled by default]
       }
      
      After fixing the above a new warning came up, which is also fixed now:
      
      XlibInt.c: In function ‘_XIOError’:
      XlibInt.c:3750:1: warning: control reaches end of non-void function [-Wreturn-type]
       }
      2c59fbe3
  9. 19 Oct, 2016 12 commits
  10. 10 Oct, 2016 3 commits
  11. 09 Oct, 2016 1 commit
  12. 05 Jul, 2016 2 commits
  13. 29 Jun, 2016 2 commits
  14. 12 Jun, 2016 1 commit