xserver/hw
Pavel Ondračka 83dc5453c6 xwayland: clean up glamor EGL state on fatal exits
Xwayland initializes glamor on top of an EGL display, but some fatal
exit paths bypass the normal screen close sequence. In particular, this
can happen through xwl_give_up() after the Wayland compositor goes away,
or through ddxGiveUp() after early startup failures such as keymap
compilation failure.

A relevant excerpt from the ASan report:
  Direct leak of 368 byte(s) in 1 object(s) allocated from:
    #0 in calloc
    #1 in dri2_display_create ../src/egl/drivers/dri2/egl_dri2.c:1014
    #2 in dri2_initialize ../src/egl/drivers/dri2/egl_dri2.c:874
    #3 in eglInitialize ../src/egl/main/eglapi.c:697
    #4 in xwl_glamor_gbm_init_egl ../hw/xwayland/xwayland-glamor-gbm.c:1739
    #5 in xwl_glamor_init ../hw/xwayland/xwayland-glamor.c:242
    #6 in xwl_screen_init ../hw/xwayland/xwayland-screen.c:1121
    #7 in AddScreen ../dix/dispatch.c:3999
    #8 in InitOutput ../hw/xwayland/xwayland.c:437
    #9 in dix_main ../dix/main.c:190
    ...
  Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 in calloc
    #1 in _eglCreateArray ../src/egl/main/eglarray.c:69
    #2 in _eglLinkConfig ../src/egl/main/eglconfig.c:85
    #3 in dri2_add_config ../src/egl/drivers/dri2/egl_dri2.c:457
    #4 in drm_add_configs_for_visuals ../src/egl/drivers/dri2/platform_drm.c:563
    #5 in dri2_initialize_drm ../src/egl/drivers/dri2/platform_drm.c:706
    #6 in dri2_initialize ../src/egl/drivers/dri2/egl_dri2.c:892
    #7 in eglInitialize ../src/egl/main/eglapi.c:697
    ...
2026-05-05 11:43:13 +02:00
..
kdrive treewide: fix typos 2026-03-14 16:52:19 +00:00
vfb vfb: use snprintf when writing XWD window name 2026-04-15 23:38:29 +00:00
xfree86 modesetting: add NULL check for drmModeObjectGetProperties in VRR check 2026-04-28 02:37:43 +00:00
xnest Xnest: use authorative declarations from X11/XKBlib.h 2026-01-25 10:40:01 -08:00
xquartz meson: replace join_paths() with / operator 2026-03-28 10:02:41 -07:00
xwayland xwayland: clean up glamor EGL state on fatal exits 2026-05-05 11:43:13 +02:00
xwin meson: replace join_paths() with / operator 2026-03-28 10:02:41 -07:00
meson.build meson.build: print a summary of the DDX to build 2026-01-25 10:40:01 -08:00