Segfault when clicking on a button in Ghidra
This happened when Ghidra presented the popup asking to accept the Apache 2 license, I pressed “I Agree” and then Weston crashed.
In this function, shsurf->view->output
is NULL
.
Here is the traceback:
(gdb) bt
#0 0x00007fa458abb11a in desktop_surface_removed (desktop_surface=<optimized out>, shell=<optimized out>) at ../desktop-shell/shell.c:2170
#1 0x00007fa463e51b23 in weston_desktop_api_surface_removed (surface=0x55e0596b73f0, desktop=0x55e0594f93e0) at ../libweston/desktop/libweston-desktop.c:150
#2 weston_desktop_xwayland_surface_destroy (dsurface=<optimized out>, user_data=0x55e0594e7af0) at ../libweston/desktop/xwayland.c:242
#3 0x00007fa463e5124c in weston_desktop_surface_destroy (surface=0x55e0596b73f0) at ../libweston/desktop/surface.c:162
#4 0x00007fa463de9eef in wl_priv_signal_final_emit (data=<optimized out>, signal=<optimized out>) at ../wayland/src/wayland-server.c:2379
#5 destroy_resource (flags=0, data=0x0, element=0x55e059567a00) at ../wayland/src/wayland-server.c:729
#6 wl_resource_destroy (resource=0x55e059567a00) at ../wayland/src/wayland-server.c:749
#7 0x00007fa463b024f6 in () at /usr/lib/libffi.so.8
#8 0x00007fa463afef5e in () at /usr/lib/libffi.so.8
#9 0x00007fa463b01b73 in ffi_call () at /usr/lib/libffi.so.8
#10 0x00007fa463df0a20 in wl_closure_invoke (closure=closure@entry=0x55e0596850b0, flags=flags@entry=2, target=<optimized out>, target@entry=0x55e059567a00, opcode=opcode@entry=0, data=<optimized out>, data@entry=0x55e0595f1270) at ../wayland/src/connection.c:1025
#11 0x00007fa463dea61f in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x55e0595f1270) at ../wayland/src/wayland-server.c:438
#12 0x00007fa463dedd82 in wl_event_loop_dispatch (loop=0x55e058cf5480, timeout=<optimized out>, timeout@entry=-1) at ../wayland/src/event-loop.c:1104
#13 0x00007fa463deaef7 in wl_display_run (display=display@entry=0x55e058cf5390) at ../wayland/src/wayland-server.c:1493
#14 0x00007fa4640a1691 in wet_main (argc=<optimized out>, argv=0x7ffc6b53aa78, test_data=<optimized out>) at ../compositor/main.c:4369
#15 0x00007fa463e9ccd0 in () at /usr/lib/libc.so.6
#16 0x00007fa463e9cd8a in __libc_start_main () at /usr/lib/libc.so.6
#17 0x000055e0571a3055 in _start ()