Summary: | Weston crash when touch->focus null | ||
---|---|---|---|
Product: | Wayland | Reporter: | Guanghua Tan <starxforever> |
Component: | weston | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | ARM | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Fix grap_touch_down |
Description
Guanghua Tan
2015-10-30 12:43:17 UTC
Created attachment 119331 [details] [review] Fix grap_touch_down check touch->focus before call "weston_view_from_global_fixed" After debug into weston codes, I find this crash issue is really caused by following commit: input: pass the global touch coordinates to the touch grab in this commit, a call to "weston_view_from_global_fixed" is added but no check to touch->focus. weston will crash when touch->focus is null. It do have the null check on touch->focus before call to "wl_touch_send_down". this crash only happens in "default_grab_touch_down()". so i solved it as attached patch file shows. Thanks Guanghua, good find. Looks like we were checking the pointer in the function, but only after it was used. I've pushed a slightly modified version of your patch to trunk. Thanks again! commit 2c40d1d30eabe46706822a8b5c94579aeba58e84 Author: Bryce Harrington <bryce@bryceharrington.org> AuthorDate: Tue Feb 2 10:18:48 2016 -0800 Commit: Bryce Harrington <bryce@bryceharrington.org> CommitDate: Tue Feb 2 10:36:44 2016 -0800 input: Fix crash when touchscreen generates out of screen coordinate With change 61ed7b6b, global touch coordinates are being passed to the touch grab. However, touch->grab is undefined in certain circumstances such as when the touch screen raises an axis X value larger than the maximum expected. Move the check for this condition earlier, before our first use of the pointer. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92736 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> |
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.