Bug 86993 - Crash when absinfo_x/y is nil
Summary: Crash when absinfo_x/y is nil
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium critical
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-04 03:38 UTC by Guanghua Tan
Modified: 2014-12-05 04:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
temporary patch to solve this issue (666 bytes, text/plain)
2014-12-04 03:38 UTC, Guanghua Tan
Details

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.