Summary: | segfault in DGAProcessPointerEvent using qemu-kvm | ||
---|---|---|---|
Product: | xorg | Reporter: | Julien Cristau <jcristau> |
Component: | Server/Input/Core | Assignee: | Peter Hutterer <peter.hutterer> |
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | CC: | ben, peter.hutterer |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Description
Julien Cristau
2010-04-10 01:43:01 UTC
Created attachment 34862 [details]
xorg log
Created attachment 34946 [details] [review] 0001-xfree86-dga-needs-to-the-master-keyboard-state-27573.patch i think this one should fix it, but I'd like to get your Tested-by to make sure. (In reply to comment #2) > Created an attachment (id=34946) [details] > 0001-xfree86-dga-needs-to-the-master-keyboard-state-27573.patch > > i think this one should fix it, but I'd like to get your Tested-by to make > sure. Sadly not. I dug a little further with gdb this time: (gdb) bt #0 0x080bdd3e in DGAProcessPointerEvent (pScreen=<value optimized out>, event=0x9dbe178, mouse=0x9dba5c8) at ../../../../hw/xfree86/common/xf86DGA.c:1097 #1 0x080dbb69 in mieqProcessDeviceEvent (dev=0x9dba5c8, event=0x9dbe178, screen=0x859d518) at ../../mi/mieq.c:404 #2 0x080dbcec in mieqProcessInputEvents () at ../../mi/mieq.c:471 #3 0x080b2347 in ProcessInputEvents () at ../../../../hw/xfree86/common/xf86Events.c:165 #4 0x08082ff0 in Dispatch () at ../../dix/dispatch.c:371 #5 0x0806697a in main (argc=9, argv=0xff90af24, envp=0xff90af4c) at ../../dix/main.c:285 (gdb) print mouse $3 = (DeviceIntPtr) 0x9dba5c8 (gdb) print *mouse->spriteInfo $4 = {sprite = 0x9dbd140, spriteOwner = 0, paired = 0x9dba5c8} (gdb) print *mouse $6 = {public = {devicePrivate = 0x9dba428, processInputProc = 0x8121a90 <ProcessKeyboardEvent>, realInputProc = 0x8121a90 <ProcessKeyboardEvent>, enqueueInputProc = 0x8094c00 <EnqueueEvent>, on = 1}, next = 0x9dcd210, startup = 1, deviceProc = 0xf7214d10, inited = 1, enabled = 1, coreEvents = 0, deviceGrab = {grabTime = {months = 0, milliseconds = 121913608}, fromPassiveGrab = 0, implicitGrab = 0, activeGrab = {next = 0x0, resource = 0, device = 0x0, window = 0x0, ownerEvents = 0, keyboardMode = 0, pointerMode = 0, grabtype = GRABTYPE_CORE, type = 0 '\000', modifiersDetail = {exact = 0, pMask = 0x0}, modifierDevice = 0x0, detail = {exact = 0, pMask = 0x0}, confineTo = 0x0, cursor = 0x0, eventMask = 0, deviceMask = 0, xi2mask = { "\000\000" <repeats 42 times>}}, grab = 0x0, activatingKey = 0 '\000', ActivateGrab = 0x8094890 <ActivateKeyboardGrab>, DeactivateGrab = 0x80945b0 <DeactivateKeyboardGrab>, sync = {frozen = 0, state = 0, other = 0x0, event = 0x0}}, type = 3, xinput_type = 95, name = 0x9dba8a8 "touchpad", id = 6, key = 0x0, valuator = 0x9dbafa8, button = 0x9dbaa50, focus = 0x0, proximity = 0x0, absolute = 0x0, kbdfeed = 0x0, ptrfeed = 0x9dbc048, intfeed = 0x0, stringfeed = 0x0, bell = 0x0, leds = 0x0, xkb_interest = 0x0, config_info = 0x0, devPrivates = 0x9dbbc30, nPrivates = 0, unwrapProc = 0x8122960 <xkbUnwrapProc>, spriteInfo = 0x9dba870, u = { master = 0x0, lastSlave = 0x0}, last = {valuators = {901, 209, 0 <repeats 34 times>}, remainder = {-0.0765800476, -0.0139235258, 0 <repeats 34 times>}, numValuators = 2, slave = 0x0}, properties = { properties = 0x9dbd060, handlers = 0x9dbd098}} Note that: mouse->name == "touchpad" mouse->type == 3 == SLAVE mouse->u.master == NULL mouse->spriteInfo->paired == mouse mouse->key == NULL (In reply to comment #3) > Note that: > > mouse->name == "touchpad" > mouse->type == 3 == SLAVE > mouse->u.master == NULL > mouse->spriteInfo->paired == mouse > mouse->key == NULL bloody hell, the device is floating. I didn't think of that - thanks. patch coming up. Created attachment 35193 [details] [review] 0001-xfree86-dga-needs-to-use-the-master-keyboard-state-2.patch Created attachment 35198 [details] [review] 0001-xfree86-dga-needs-to-use-the-master-keyboard-state-2.patch sorry, uncommitted changes (an & missing) made the last patch fail to compile. Fixed now. (In reply to comment #6) > Created an attachment (id=35198) [details] > 0001-xfree86-dga-needs-to-use-the-master-keyboard-state-2.patch > > sorry, uncommitted changes (an & missing) made the last patch fail to compile. > Fixed now. That seems to fix the bug, thanks. commit 10de9e8ee37265a35ceeceb2007d711da70d4f2d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 16 16:35:22 2010 +1000 xfree86: dga needs to use the master keyboard state (#27573) GetPairedDevice() may not always return the keyboard, resulting in a null-pointer dereference when accessing the XKB state. For floating devices, the GetMaster() returns the device itself. X.Org Bug 27573 <http://bugs.freedesktop.org/show_bug.cgi?id=27573> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Ben Hutchings <ben@decadent.org.uk> closing, the fix is on master. |
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.