0x7f9170372987 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1
An error occurred
0x7f916fe62aa3 in zalloc ../include/libweston/zalloc.h:38
#2
An error occurred
0x7f916fe7398d in weston_buffer_create_solid_rgba ../libweston/compositor.c:2603
#3
An error occurred
0x7f915bfec879 in weston_curtain_create ../shell-utils/shell-utils.c:162
#4
An error occurred
0x7f915bfd9e51 in shell_ensure_fullscreen_black_view ../desktop-shell/shell.c:2082
#5
An error occurred
0x7f915bfda2a9 in shell_configure_fullscreen ../desktop-shell/shell.c:2118
#6
An error occurred
0x7f915bfdc72d in desktop_surface_committed ../desktop-shell/shell.c:2538
#7
An error occurred
0x7f915bfa3ef5 in weston_desktop_api_committed ../libweston-desktop/libweston-desktop.c:159
#8
An error occurred
0x7f915bfae778 in weston_desktop_xdg_toplevel_committed ../libweston-desktop/xdg-shell.c:746
#9
An error occurred
0x7f915bfb0d45 in weston_desktop_xdg_surface_committed ../libweston-desktop/xdg-shell.c:1374
#10
An error occurred
0x7f915bfa7382 in weston_desktop_surface_surface_committed ../libweston-desktop/surface.c:174
#11
An error occurred
0x7f916fe628a6 in wl_signal_emit /home/mvlad/install-amd64/include/wayland-server-core.h:481
#12
An error occurred
0x7f916fe7c0e2 in weston_surface_commit_state ../libweston/compositor.c:4062
#13
An error occurred
0x7f916fe7c161 in weston_surface_commit ../libweston/compositor.c:4068
#14
An error occurred
0x7f916fe7c6ef in surface_commit ../libweston/compositor.c:4146
#15
An error occurred
0x7f916fc847e9 (/usr/lib/x86_64-linux-gnu/libffi.so.8+0x77e9)
We do not migrate the weston_curtain destruction from
desktop_surface_removed() to desktop_shell_destroy_surface() because
we'd want have the curtain removed before the animation starts.
If we were to move the black view destruction, *and* only handle it from
desktop_shell_destroy_surface() the animation runs but the black curtain
will be removed right at the end, effectively diminishing the effect of
the animations.
To this end, we keep both of the two worlds, if the client terminates on
its own, we keep the same animation effect, but if the compositor is
shutting down we destroy it immediately.
We remove wl_list_for_each_safe() and instead loop each time to avoid
using a stale pointer iterator which could cause a UAF as the shsurf
would be free'ed.
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>