Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 222835

Summary: Wrong number of valuators in x11-base/xorg-server-1.4.0.90-r4
Product: Gentoo Linux Reporter: Sascha Hlusiak <bugs>
Component: New packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://readlist.com/lists/lists.freedesktop.org/xorg/4/20658.html
Whiteboard:
Package list:
Runtime testing required: ---

Description Sascha Hlusiak 2008-05-19 18:41:17 UTC
See http://readlist.com/lists/lists.freedesktop.org/xorg/4/20658.html

It was fixed in git upstream but gentoo ships a faulty 0020-dix-set-the-correct-number-of-valuators-in-valuator.patch. Please change it to:

diff --git a/dix/getevents.c b/dix/getevents.c
index 12d8189..b7ba69b 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -344,7 +344,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator,
     for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) {
         xv->type = DeviceValuator;
         xv->first_valuator = i;
-        xv->num_valuators = num_valuators;
+        xv->num_valuators = ((final_valuator - i) > 6) ? 6 : (final_valuator - i);
         xv->deviceid = pDev->id;
         switch (final_valuator - i) {
         case 6:


Thanks

Reproducible: Always

Steps to Reproduce:
1. Use touchpad or joystick driver
2. Have them report unusual valuators
3. See X crash with "Bad valuators reported for device ..."
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2008-05-19 22:46:20 UTC
I just asked the upstream maintainer of the 1.4 branch (Daniel Stone) to pull commits e7a364425547103a98acabfc67d16e1ae0c2967f and 333e7123dc484888d79c0f5aa3977bd72f1eb341. Our patches come straight from there, but the fix you mention is only in the main development branch, master.
Comment 2 Sascha Hlusiak 2008-05-19 22:51:31 UTC
True, I saw it was committed to the server-1.5-branch and didn't check server-1.4-branch where the bogus commit existed too. Thanks.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2008-05-19 22:53:04 UTC
Woops, sorry to drown you in background info -- didn't notice it was you, Sascha!
Comment 4 Sascha Hlusiak 2008-10-04 17:00:52 UTC
Closing because fixed upstream in 1.4.1.