Bug 86993

Summary: Crash when absinfo_x/y is nil
Product: Wayland Reporter: Guanghua Tan <starxforever>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: temporary patch to solve this issue

Description Guanghua Tan 2014-12-04 03:38:17 UTC
Created attachment 110439 [details]
temporary patch to solve this issue

libinput, SRCREV = 56b5f846ac7f8243da4ba2f288654becf1014c46

issue:
   Weston will crash when plugin a mouse device.

precondition:
   Define "LIBINPUT_CALIBRATION_MATRIX" in udev rules;

crash point:
   crash happens in function "evdev_device_calibrate()" when calculate x/y scaler: 
   
   sx = device->abs.absinfo_x->maximum - device->abs.absinfo_x->minimum + 1;
   sy = device->abs.absinfo_y->maximum - device->abs.absinfo_y->minimum + 1;

   inside this calculation, maybe the absinfo_x/y is nil, then the access to maximum & minimum value will aborted.

   even it is caused by the driver, i thin libinput need to focus this case.

   see the attached patch for a temporary solution.
Comment 1 Peter Hutterer 2014-12-05 04:10:58 UTC
commit f9336361430f176e1d090decd19f5af3650f1814
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 5 13:41:04 2014 +1000

    udev: only apply default calibration on absolute devices

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.