Bug 106122 - Weston segfaults on startup if wl_display_create fails
Summary: Weston segfaults on startup if wl_display_create fails
Status: RESOLVED MOVED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: low minor
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-18 09:18 UTC by hobbitalastair
Modified: 2018-06-08 23:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Prototype patch to fix the segfault (1.09 KB, patch)
2018-06-07 08:39 UTC, hobbitalastair
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description hobbitalastair 2018-04-18 09:18:21 UTC
The call to wl_display_create does not check if the returned result is NULL, which can happen (eg if epoll is not compiled into the kernel). This can cause a segfault on startup.

See https://github.com/wayland-project/weston/blob/42c0e14808bfd39e1a2eea34f43f0b5fe20fbb16/compositor/main.c#L1886, and https://github.com/wayland-project/wayland/blob/bf7cc6805396af8df3b40e10c63de701346c93dd/src/wayland-server.c#L1017 for an example of where wl_display_create may return NULL.
Comment 1 hobbitalastair 2018-06-07 08:39:15 UTC
Created attachment 140063 [details] [review]
Prototype patch to fix the segfault

Currently only build tested
Comment 2 GitLab Migration User 2018-06-08 23:55:57 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/101.


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.