HomeFreeBSD

x11-wm/sway: unbreak WLR_BACKENDS != drm after 3eb7d7b7f6a0

Description

x11-wm/sway: unbreak WLR_BACKENDS != drm after 3eb7d7b7f6a0

$ echo 'exec swaymsg -t get_outputs' >/tmp/sway.conf
$ WLR_BACKENDS=headless sway -c /tmp/sway.conf
00:00:00.067 [wlr] [types/wlr_drm_lease_v1.c:716] No DRM backend supplied, failed to create wlr_drm_lease_v1_manager
00:00:00.000 [common/ipc-client.c:87] Unable to receive IPC response
Segmentation fault
(lldb) bt

  • thread #1, name = 'sway', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    • frame #0: 0x000000082b381e84 libc.so.7`strlen + 84 frame #1: 0x0000000822cc530d libjson-c.so.5`json_object_new_string(s=0x0000000000000000) at json_object.c:1276:36 frame #2: 0x0000000000234de9 sway`ipc_json_describe_output(output=0x0000000871982200, object=0x00000008755e63b0) at ipc-json.c:255:4 frame #3: 0x000000000023441f sway`ipc_json_describe_node(node=0x0000000871982200) at ipc-json.c:707:3 frame #4: 0x0000000000239d07 sway`ipc_client_handle_command(client=0x000000084e3a1380, payload_length=0, payload_type=IPC_GET_OUTPUTS) at ipc-server.c:672:31 frame #5: 0x00000000002397fa sway`ipc_client_handle_readable(client_fd=27, mask=1, data=0x000000084e3a1380) at ipc-server.c:267:3 frame #6: 0x00000008271b88c7 libwayland-server.so.0`wl_event_source_fd_dispatch(source=0x000000084e3a16c0, ep=0x0000000820f4e360) at event-loop.c:112:9 frame #7: 0x00000008271b9fd4 libwayland-server.so.0`wl_event_loop_dispatch(loop=0x000000084e344320, timeout=-1) at event-loop.c:1027:4 frame #8: 0x00000008271b5c6f libwayland-server.so.0`wl_display_run(display=0x000000084e35e000) at wayland-server.c:1431:3 frame #9: 0x000000000023e205 sway`server_run(server=0x00000000002a3070) at server.c:310:2 frame #10: 0x000000000023cd84 sway`main(argc=3, argv=0x0000000820f4e608) at main.c:431:2 frame #11: 0x000000000022ca10 sway`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7

(lldb) f 2
frame #2: 0x0000000000234de9 sway`ipc_json_describe_output(output=0x0000000871982200, object=0x00000008755e63b0) at ipc-json.c:255:4

252                          json_object_new_string(
253                                  ipc_json_orientation_description(L_NONE)));
254          json_object_object_add(object, "make",

-> 255 json_object_new_string(wlr_output->make));

256          json_object_object_add(object, "model",
257                          json_object_new_string(wlr_output->model));
258          json_object_object_add(object, "serial",

(lldb) p *wlr_output
(wlr_output) $0 = {
[...]

make = 0x0000000000000000
model = 0x0000000000000000
serial = 0x0000000000000000

[...]

PR: 267853
Reported by: lbartoletti
Regressed by: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/be86145322e6

Details

Provenance
jbeichAuthored on Nov 21 2022, 11:13 AM
Parents
R11:0117ffff6fde: databases/pg.el: Update to 0.19
Branches
Unknown
Tags
Unknown