xserver-multidpi/hw
Lyude 4f29366f1e xwayland: Don't load extension list more than once
When running an Xwayland server from the command line, we end up
resetting the server every time all of the clients connected to the
server leave. This would be fine, except that xwayland makes the mistake
of unconditionally calling LoadExtensionList(). This causes us to setup
the glxExtension twice in a row which means that when we lose our last
client on the second server generation, we end up trying to call the glx
destructors twice in a row resulting in a segfault:

(EE)
(EE) Backtrace:
(EE) 0: Xwayland (OsSigHandler+0x3b) [0x4982f9]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x70845bf]
(EE) 2: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x32897d) [0x1196e5bd]
(EE) 3: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x328a45) [0x1196e745]
(EE) 4: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x32665f) [0x11969f7f]
(EE) 5: Xwayland (__glXDRIscreenDestroy+0x30) [0x54686e]
(EE) 6: Xwayland (glxCloseScreen+0x3f) [0x5473db]
(EE) 7: Xwayland (glxCloseScreen+0x53) [0x5473ef]
(EE) 8: Xwayland (dix_main+0x7b6) [0x44c8c9]
(EE) 9: Xwayland (main+0x28) [0x61c503]
(EE) 10: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x72b1401]
(EE) 11: Xwayland (_start+0x2a) [0x4208fa]
(EE) 12: ? (?+0x2a) [0x2a]
(EE)
(EE) Segmentation fault at address 0x18
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)

Easy reproduction recipe:
- Start an Xwayland session with the default settings
- Open a window
- Close that window
- Open another window
- Close that window
- Total annihilation occurs

Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-31 21:42:04 +10:00
..
dmx dmx: Fix decl mismatch for XRT_WINDOW 2017-05-03 15:44:04 -04:00
kdrive xephyr: Fix regeneration 2017-05-11 14:13:12 -04:00
vfb Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
xfree86 xfree86: Fix interpretation of xf86WaitForInput timeout 2017-05-29 13:53:39 +10:00
xnest Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
xquartz Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
xwayland xwayland: Don't load extension list more than once 2017-05-31 21:42:04 +10:00
xwin hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds 2017-05-15 17:46:37 -04:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00
meson.build Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00