Bug 106129 - Weston segfaults on startup if wl_event_loop_add_timer fails
Summary: Weston segfaults on startup if wl_event_loop_add_timer fails
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium minor
Assignee: Wayland bug list
QA Contact:
Depends on:
Reported: 2018-04-18 21:07 UTC by hobbitalastair
Modified: 2018-06-08 23:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description hobbitalastair 2018-04-18 21:07:30 UTC
Running weston with the headless backend will segfault if wl_event_loop_add_timer fails (eg if timerfd is not enabled in the kernel) since https://github.com/wayland-project/weston/blob/42c0e14808bfd39e1a2eea34f43f0b5fe20fbb16/libweston/compositor-headless.c#L160 never checks if the returned result is NULL.
Comment 1 Pekka Paalanen 2018-04-19 09:01:29 UTC
Hi, sure, we could turn that into an explicit abort().

Adding a fallback path would not be feasible or desirable.
Comment 2 hobbitalastair 2018-04-20 07:04:40 UTC
Yes, I was just thinking that it might be nicer if there was some kind of error message to avoid needing to break out gdb... something like at https://github.com/wayland-project/weston/blob/42c0e14808bfd39e1a2eea34f43f0b5fe20fbb16/compositor/main.c#L1928?
Comment 3 GitLab Migration User 2018-06-08 23:56:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/weston/issues/102.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.