Bug 275625
Summary: | [WPE] WPE Platform: Do not assume that Wayland seats are bound before text input manager | ||
---|---|---|---|
Product: | WebKit | Reporter: | Adrian Perez <aperez> |
Component: | WPE WebKit | Assignee: | Adrian Perez <aperez> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bugs-noreply |
Priority: | P2 | ||
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=265649 | ||
Bug Depends on: | |||
Bug Blocks: | 265636 |
Adrian Perez
The Wayland registry listener in WPEDisplayWayland.cpp assumes a particular
order in which the compositor will advertise the available global interfaces,
and this bit:
} else if (!std::strcmp(interface, "zwp_text_input_manager_v3")) {
priv->textInputManagerV3 = static_cast<struct zwp_text_input_manager_v3*>(wl_registry_bind(registry, name, &zwp_text_input_manager_v3_interface, 1));
priv->textInputV3 = zwp_text_input_manager_v3_get_text_input(priv->textInputManagerV3, priv->wlSeat->seat());
}
...assumes that priv->wlSeat will be valid at the point when the input manager
interface is advertised. But alas, there is no defined order in the Wayland
protocol, and only the wl_registry global is guaranteed to be the first thing
coming down the wire (for bootstrapping).
Currently on my system using the labwc compositor (which is based on wlroots)
the input manager interface is announced *before* the seat, resulting in a
NULL pointer dereference with its corresponding SIGSEGV and crash.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/29951
EWS
Committed 280164@main (73db3cb76418): <https://commits.webkit.org/280164@main>
Reviewed commits have been landed. Closing PR #29951 and removing active labels.