[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#609750: /usr/bin/Xorg: crash (SIGSEGV) in DGAProcessPointerEvent()



Cyril Brulebois <kibi@debian.org> (12/01/2011):
> thanks for the backtrace. Can you attach “bt full”'s output, or
> confirm that buts is NULL in frame #0?

Or you could fetch the source of xorg-server …-10 or …-11 (from sid,
uploaded a few hours ago, which shouldn't change anything for this
specific issue), and apply the attached patch on top of it, and tell
us if that helps.

To apply it, either patch -p1 < foo, then build; or drop it under
debian/patches and add the filename to debian/patches/series, then
build. It doesn't seem to conflict with anything we have currently.

KiBi.
From 8c01332a34b9f6a66fa6720e52b06c192fa4c049 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 3 Sep 2010 11:54:41 +1000
Subject: [PATCH] mi: handle DGA subtypes when determining the master device.

The subtype in the DGA event is the core type and all ET_ event types (where
applicable) are identical to the core types. Thus the switch statement below
will work as required and assign the right master device.

Fixes a crasher bug on keyboard devices with valuators. If a device sends a
motion event while grabbed and a DGA client is active (but has not selected
input through DGA), the valuator event is posted through the VCK and
eventually results in a NULL-pointer dereference on dev->valuator.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 31ab9f8860848504df18a8be9d19b817b191e0df)
(cherry picked from commit faecab3b13bbaecf4f35f49b833d1b79a5fb647d)

Signed-off-by: Cyril Brulebois <kibi@debian.org>
---
 mi/mieq.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/mi/mieq.c b/mi/mieq.c
index 9b6d0c9..97f4afc 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -320,6 +320,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
 {
     DeviceIntPtr mdev;
     int len = original->any.length;
+    int type = original->any.type;
 
     CHECKEVENT(original);
 
@@ -327,7 +328,12 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
     if (!sdev || !sdev->u.master)
         return NULL;
 
-    switch(original->any.type)
+#if XFreeXDGA
+    if (type == ET_DGAEvent)
+        type = original->dga_event.subtype;
+#endif
+
+    switch(type)
     {
         case ET_KeyPress:
         case ET_KeyRelease:
-- 
1.7.2.3

Attachment: signature.asc
Description: Digital signature


Reply to: