weston/compositor
Pekka Paalanen ff94ba33cd compositor: fix shutdown when xwayland failed to start
This patch fixes the following:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==528956==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7fbc5d66bdd7 bp 0x7ffd465573c0 sp 0x7ffd46557398 T0)
==528956==The signal is caused by a WRITE memory access.
==528956==Hint: address points to the zero page.
    #0 0x7fbc5d66bdd7 in wl_list_remove ../../git/wayland/src/wayland-util.c:56
    #1 0x7fbc5cb8869e in wxw_compositor_destroy ../../git/weston/compositor/xwayland.c:357
    #2 0x7fbc5baf3ca6 in weston_signal_emit_mutable ../../git/weston/shared/signal.c:62
    #3 0x7fbc5ba4d6f9 in weston_compositor_destroy ../../git/weston/libweston/compositor.c:8639
    #4 0x7fbc5cb7a5f2 in wet_main ../../git/weston/compositor/main.c:3772
    #5 0x55bd13de2179 in main ../../git/weston/compositor/executable.c:33
    #6 0x7fbc5be61d09 in __libc_start_main ../csu/libc-start.c:308
    #7 0x55bd13de2099 in _start (/home/pq/local/bin/weston+0x1099)

The problem is triggered by configuring a bad path to Xwayland in
weston.ini, which causes exec() to fail. The fork() succeeded though,
which means the weston_process was already on the watch list, and the
watch can be handled, making sigchl_handler() leave the link
uninitialized.

Making sure the link remains removable fixes this.

Fixes: 18897253d4

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-07-08 11:56:04 +03:00
..
cms-colord.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
cms-helper.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
cms-helper.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
cms-static.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
executable.c tests: add mechanism to change Weston's behavior when running certain tests 2020-10-27 11:21:55 +00:00
main.c compositor: fix shutdown when xwayland failed to start 2022-07-08 11:56:04 +03:00
meson.build compositor: deprecate cms-static and cms-colord plugins 2022-07-06 10:38:44 +00:00
screen-share.c screen-share: Avoid bit-shifting large values 2022-04-20 19:45:28 +03:00
systemd-notify.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
text-backend.c Defer launch input method with wl_event_loop_add_idle. 2022-04-19 07:06:30 -07:00
weston-private.h compositor: add color_characteristics weston.ini option 2022-05-27 10:30:35 +00:00
weston-screenshooter.c gl-renderer: Add hook to fill weston_buffer for EGL 2022-04-25 14:27:08 +00:00
weston.desktop Remove dbus-launch from weston.desktop 2017-01-18 12:21:57 +00:00
weston.h compositor: Move child_process_list from global to wet_compositor. 2021-07-06 18:46:09 +00:00
xwayland.c xwayland: Add compositor destroy listener to free allocation 2022-07-05 13:25:37 +01:00