swayfx/sway
Dominique Martinet bc1e99305a xdg_shell: listen to fullscreen request on map
That event comes from the toplevel and not the surface, so would cause
a use-after-free on destroy if the toplevel got destroyed first:

==5454==ERROR: AddressSanitizer: heap-use-after-free on address 0x6110001ed198 at pc 0x000000472d10 bp 0x7ffc19070a80 sp 0x7ffc19070a70
WRITE of size 8 at 0x6110001ed198 thread T0
    #0 0x472d0f in wl_list_remove ../common/list.c:157
    #1 0x42e159 in handle_destroy ../sway/desktop/xdg_shell_v6.c:243
    #2 0x7fa9e5b28ce8 in wlr_signal_emit_safe ../util/signal.c:29
    #3 0x7fa9e5afd6b1 in destroy_xdg_surface_v6 ../types/xdg_shell_v6/wlr_xdg_surface_v6.c:101
    #4 0x7fa9e5d98025 in destroy_resource src/wayland-server.c:688
    #5 0x7fa9e5d98091 in wl_resource_destroy src/wayland-server.c:705
    #6 0x7fa9e27f103d in ffi_call_unix64 (/lib64/libffi.so.6+0x603d)
    #7 0x7fa9e27f09fe in ffi_call (/lib64/libffi.so.6+0x59fe)
    #8 0x7fa9e5d9bf2c  (/lib64/libwayland-server.so.0+0xbf2c)
    #9 0x7fa9e5d983de in wl_client_connection_data src/wayland-server.c:420
    #10 0x7fa9e5d99f01 in wl_event_loop_dispatch src/event-loop.c:641
    #11 0x7fa9e5d98601 in wl_display_run src/wayland-server.c:1260
    #12 0x40a2f4 in main ../sway/main.c:433
    #13 0x7fa9e527318a in __libc_start_main ../csu/libc-start.c:308
    #14 0x40b749 in _start (/opt/wayland/bin/sway+0x40b749)

0x6110001ed198 is located 152 bytes inside of 240-byte region [0x6110001ed100,0x6110001ed1f0)
freed by thread T0 here:
    #0 0x7fa9e7c89880 in __interceptor_free (/lib64/libasan.so.5+0xee880)
    #1 0x7fa9e5affce9 in destroy_xdg_toplevel_v6 ../types/xdg_shell_v6/wlr_xdg_toplevel_v6.c:23
    #2 0x7fa9e5d98025 in destroy_resource src/wayland-server.c:688

previously allocated by thread T0 here:
    #0 0x7fa9e7c89e50 in calloc (/lib64/libasan.so.5+0xeee50)
    #1 0x7fa9e5b00eea in create_xdg_toplevel_v6 ../types/xdg_shell_v6/wlr_xdg_toplevel_v6.c:427
    #2 0x7fa9e27f103d in ffi_call_unix64 (/lib64/libffi.so.6+0x603d)

The toplevel only notifies the compositor on destroy if it was mapped,
so only listen to events at map time.
2018-06-30 22:42:24 +09:00
..
commands Fix compile error 2018-06-30 21:07:54 +10:00
config Store sway_outputs so that they can be reenabled 2018-06-06 20:11:24 -04:00
desktop xdg_shell: listen to fullscreen request on map 2018-06-30 22:42:24 +09:00
input Merge remote-tracking branch 'upstream/master' into atomic 2018-06-29 20:04:24 +10:00
tree sway views: add helpers to get view and layer from wlr_surface 2018-06-30 22:31:14 +09:00
base64.c Rework get_clipboard implementation 2017-07-07 21:51:34 +02:00
commands.c Implement gaps (PR #2047) 2018-06-09 09:34:56 -04:00
config.c Refactor everything that needs to arrange windows 2018-06-09 10:11:25 +10:00
criteria.c sway/criteria: gcc string truncation warning fix 2018-06-08 22:30:13 +09:00
debug-tree.c Add L_FLOATING back to debug tree 2018-06-01 23:14:58 +10:00
ipc-json.c Fix compilation errors related to disabled outputs 2018-06-09 11:38:16 +01:00
ipc-server.c Switch output storing from list_t to wl_list 2018-06-06 20:11:24 -04:00
main.c Remove incorrect assertion and supporting code 2018-06-26 20:18:57 +10:00
meson.build Merge remote-tracking branch 'upstream/master' into atomic 2018-06-29 20:04:24 +10:00
security.c Add minimal config subsystem 2017-12-05 10:40:55 +01:00
server.c Merge remote-tracking branch 'upstream/master' into atomic 2018-06-29 20:04:24 +10:00
sway-bar.5.scd Add sway-bar(5) 2018-05-11 21:13:43 -04:00
sway-input.5.scd Add sway-input(5) 2018-05-11 21:25:05 -04:00
sway.1.scd Add sway(5) 2018-05-11 21:03:43 -04:00
sway.5.scd Support i3's legacy force_focus_wrapping command 2018-05-28 11:09:46 -04:00