WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
275625
[WPE] WPE Platform: Do not assume that Wayland seats are bound before text input manager
https://bugs.webkit.org/show_bug.cgi?id=275625
Summary
[WPE] WPE Platform: Do not assume that Wayland seats are bound before text in...
Adrian Perez
Reported
2024-06-18 11:22:00 PDT
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
Comment 1
2024-06-18 15:31:01 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/29951
EWS
Comment 2
2024-06-18 23:25:36 PDT
Committed
280164@main
(73db3cb76418): <
https://commits.webkit.org/280164@main
> Reviewed commits have been landed. Closing PR #29951 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug