Enerccio / ewlc

Wayland compositor library - extended
MIT License
20 stars 3 forks source link

Segfault in libwayland-server if view_created returns false with certain views #80

Open WLCIssuesBot opened 7 years ago

WLCIssuesBot commented 7 years ago

Issue by Timidger Saturday Jan 07, 2017 at 01:03 GMT Originally opened as https://github.com/Cloudef/wlc/issues/221


I have found that if view_created (my version here) returns false when my background program is initializing (here is the relevant bit of that code) then I get a segfault deep within libwayland-server.

I tested this by modifying the function to always return false and the only time the segfault was triggered was when I tried to run way-cooler-bg.

Not sure if wlc bug, or a weird wayland bug. I think if I modify the background program this might work, because it seems like it might have to do with how it's rendered that's causing the issues.

EDIT: Here's the backtrace from gdb, I can compile libwayland-server with debug symbols if you think that would help (already did with wlc):

#0  0x00007ffff6e0cdd3 in epoll_wait () at /usr/lib/libc.so.6
#1  0x00007ffff660ed03 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#2  0x00007ffff660d1da in wl_display_run () at /usr/lib/libwayland-server.so.0
#3  0x00007ffff7bb56ca in wlc_run () at /home/timidger/src/wlc/src/wlc.c:260
#4  0x000055555577fcbd in rustwlc::run_wlc () at /home/timidger/.cargo/registry/src/github.com-1ecc6299db9ec823/rustwlc-0.5.3/src/lib.rs:183
#5  0x000055555574b2c6 in way_cooler::main () at /home/timidger/src/way-cooler/src/main.rs:172
#6  0x0000555555911407 in __rust_maybe_catch_panic ()
#7  0x0000555555908042 in std::rt::lang_start::h538f8960e7644c80 ()
#8  0x00005555557757d4 in main ()

And a pastebin of the entire log, with all debugging turned on for wlc.