#1658 NORM Trial-2: Xorg post-1.3: Package xf86-input-evdev's git master

Zarro Boogs per Child bugtracker at laptop.org
Tue Jun 12 11:31:03 EDT 2007


#1658: Xorg post-1.3: Package xf86-input-evdev's git master
---------------------+------------------------------------------------------
  Reporter:  bernie  |       Owner:  warp              
      Type:  defect  |      Status:  new               
  Priority:  normal  |   Milestone:  Trial-2           
 Component:  distro  |     Version:  Git as of bug date
Resolution:          |    Keywords:                    
  Verified:  0       |  
---------------------+------------------------------------------------------
Changes (by bernie):

  * owner:  ajax => warp

Comment:

 Please don't package GIT's tip as of today (commit 2d2c480)
 as it introduced a regression.

 Executing this:
 {{{
 respeclaration --add-arbitrary-device 0 device /dev/input/event2
 identifier /dev/input/event2 driver evdev sendcoreevents true
 }}}

 Causes the X server to segfault:

 {{{
 Program received signal SIGSEGV, Segmentation fault.
 0xb7cdf81f in EvdevAxisAbsNew1 (pInfo=0x82a1dd0) at evdev_axes.c:731
 731             pInfo->dev->valuator->mode = Absolute;
 (gdb) bt
 #0  0xb7cdf81f in EvdevAxisAbsNew1 (pInfo=0x82a1dd0) at evdev_axes.c:731
 #1  0xb7cdfd6c in EvdevAxesNew1 (pInfo=0x82a1dd0) at evdev_axes.c:838
 #2  0xb7cddd4d in EvdevPreInit (drv=0x827b090, dev=0x82a1d18, flags=0)
     at evdev.c:443
 #3  0x080ef42b in NewInputDeviceRequest (options=0x82a1ce0,
 pdev=0xbfc6b24c)
     at xf86Xinput.c:393
 #4  0x080b4fac in configAddDevice (message=0x82a0158, iter=0xbfc6b340,
     reply=0x82a0230, r_iter=0xbfc6b2f8, error=0xbfc6b330) at config.c:171
 #5  0x080b53b0 in configMessage (connection=0x829fdc8, message=0x82a0158,
     closure=0x829fdc8) at config.c:304
 }}}

 The problem is introduced by this hunk:

 {{{
 @@ -728,13 +728,13 @@ EvdevAxisAbsNew1(InputInfoPtr pInfo)

      s = xf86SetStrOption(pInfo->options, "Mode", "Absolute");
      if (!strcasecmp(s, "Absolute")) {
 -       state->mode = Absolute;
 +       pInfo->dev->valuator->mode = Absolute;
         xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name,
 s);
      } else if (!strcasecmp(s, "Relative")) {
 -       state->mode = Relative;
 +       pInfo->dev->valuator->mode = Relative;
         xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name,
 s);
      } else {
 -       state->mode = Absolute;
 +       pInfo->dev->valuator->mode = Absolute;
         xf86Msg(X_CONFIG, "%s: Unknown Mode: %s.\n", pInfo->name, s);
      }

 }}}

 EvdevAxisAbsNew1() is being called from PreInit() and now accesses
 the pInfo->dev->valuator field, which is being initialized later
 by InitValuatorClassDeviceStruct(), called by Init().

 Reverting to the previous commit fixed the crash for me.

-- 
Ticket URL: <http://dev.laptop.org/ticket/1658#comment:3>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list