swayfx/sway
Dominique Martinet b0918b1058 ipc-server: add display destroy listener and remove ipc_terminate
wl_event_source_remove() is illegal after display has been destroyed,
so just destroy everything when we still can.

==20392==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000001240 at pc 0x00000048e86e bp 0x7ffe4b557e00 sp 0x7ffe4b557df0
READ of size 8 at 0x607000001240 thread T0
    #0 0x48e86d in wl_list_insert ../common/list.c:149
    #1 0x7fdf673d4d7d in wl_event_source_remove src/event-loop.c:487
    #2 0x41b742 in ipc_terminate ../sway/ipc-server.c:94
    #3 0x40b1ad in main ../sway/main.c:440
    #4 0x7fdf6664c18a in __libc_start_main ../csu/libc-start.c:308
    #5 0x409359 in _start (/opt/wayland/bin/sway+0x409359)

0x607000001240 is located 48 bytes inside of 72-byte region [0x607000001210,0x607000001258)
freed by thread T0 here:
    #0 0x7fdf692c4880 in __interceptor_free (/lib64/libasan.so.5+0xee880)
    #1 0x7fdf673d371a in wl_display_destroy src/wayland-server.c:1097

previously allocated by thread T0 here:
    #0 0x7fdf692c4c48 in malloc (/lib64/libasan.so.5+0xeec48)
    #1 0x7fdf673d4d9e in wl_event_loop_create src/event-loop.c:522
    #2 0x40acb2 in main ../sway/main.c:363
    #3 0x7fdf6664c18a in __libc_start_main ../csu/libc-start.c:308
2018-07-04 18:47:11 +09:00
..
commands cmd_assign: fix leak on error 2018-07-02 08:03:41 +09:00
config bar config: fix uninitialized accesses on init error 2018-07-02 08:03:41 +09:00
desktop Fix damage on swaybar when view requests to exit fullscreen 2018-07-02 21:58:21 +10:00
input Fix focus related damage 2018-07-04 15:38:08 +10:00
tree workspace_next_name: fix string length for ws_num >= 100 2018-07-02 08:03:41 +09:00
base64.c Rework get_clipboard implementation 2017-07-07 21:51:34 +02:00
commands.c config_commands_command: make alloc failure check more permanent 2018-07-02 08:03:41 +09:00
config.c load_config: move NULL path check before first use 2018-07-02 08:03:41 +09: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 ipc-server: add display destroy listener and remove ipc_terminate 2018-07-04 18:47:11 +09:00
main.c ipc-server: add display destroy listener and remove ipc_terminate 2018-07-04 18:47:11 +09:00
meson.build Add idle inhibit unstable v1 support 2018-07-02 09:29:16 +09:00
security.c Add minimal config subsystem 2017-12-05 10:40:55 +01:00
server.c startup: move setenv WAYLAND_DISPLAY before config execs 2018-07-04 13:52:26 +09: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