[Xquartz-changes] xserver: Branch 'server-1.15-branch' - 6 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Wed Jul 23 10:44:26 PDT 2014


 Xi/exevents.c           |    4 ++++
 configure.ac            |    6 +++---
 hw/xfree86/xorgconf.cpp |    2 +-
 include/misc.h          |   18 +++++++++++-------
 man/Xserver.man         |    5 ++---
 5 files changed, 21 insertions(+), 14 deletions(-)

New commits:
commit a0e938baa3ab51c8f42d62522da15d1fd56d7d1c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jun 27 10:57:48 2014 +1000

    Bump version to 1.15.2
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/configure.ac b/configure.ac
index ea4f321..b25fcf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.15.1.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2014-06-22"
+AC_INIT([xorg-server], 1.15.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2014-06-27"
 RELEASE_NAME="Malt Candy"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
commit 2abbf56493bb8636ae1ef6de2cbb412ac79c717f
Author: Steven McDonald <steven at steven-mcdonald.id.au>
Date:   Sun May 18 13:42:08 2014 +0200

    Xi: block SIGIOs while copying device classes around
    
    I've been seeing sporadic (anywhere from once every few days to 3-4
    times a day) crashes and freezes in X. The problematic behaviour isn't
    always the same, but I chose a particular incident to debug, and found
    that X was segfaulting in updateMotionHistory, on line 575 of
    dix/getevents.c.
    
    After some further investigation, I found that the bug was being
    triggered when a SIGIO was received in DeepCopyPointerClasses, between
    the AllocValuatorClass call (line 540) and updating the to->valuator
    pointer (line 545). AllocValuatorClass calls realloc() on to->valuator,
    so between these lines, it's not guaranteed to point to allocated
    memory.
    
    It seems the SIGIO handler is calling updateMotionHistory, which is
    reading the memory pointed to by to->valuator and getting a wrong value
    for last_motion, which updates buff to point to wildly the wrong place
    and thus generates a segfault when a memcpy() is done into buff.
    
    I am attaching a patch which I've been running on that machine for the
    past three days, and haven't yet observed any more crashing or freezing
    behaviour. The patch simply calls OsBlockSIGIO while
    DeepCopyDeviceClasses is in progress, as the state of the X server's
    device data structures is not guaranteed to be in a consistent state
    during that time.
    
    Debian bug#744303 <https://bugs.debian.org/744303>
    
    Signed-off-by: Julien Cristau <jcristau at debian.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit d7a2df0a7499864cb005b098b79c1bdf884f6600)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index ad02650..01bdea6 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -661,6 +661,8 @@ void
 DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to,
                       DeviceChangedEvent *dce)
 {
+    OsBlockSIGIO();
+
     /* generic feedback classes, not tied to pointer and/or keyboard */
     DeepCopyFeedbackClasses(from, to);
 
@@ -668,6 +670,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to,
         DeepCopyKeyboardClasses(from, to);
     if ((dce->flags & DEVCHANGE_POINTER_EVENT))
         DeepCopyPointerClasses(from, to);
+
+    OsReleaseSIGIO();
 }
 
 /**
commit 2ceb44827f86d9f5f995448c3cf603ee9459fef3
Author: Robert Ancell <robert.ancell at canonical.com>
Date:   Thu May 22 10:43:52 2014 +1200

    Fix overflow checking extension versions
    
    The easiest way to check for the version of an extension is to send the maximum
    possible version numbers in the QueryVersion request. The X server overflows on
    these as it assumes you will send a reasonable version number.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 548fc937b22d4dfe7f96e0bd77522261603a2c2f)

diff --git a/include/misc.h b/include/misc.h
index 17de710..9c2f573 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -259,15 +259,19 @@ extern void FormatDouble(double dbl, char *string);
  * or a value greater than 0
  */
 static inline int
-version_compare(uint16_t a_major, uint16_t a_minor,
-                uint16_t b_major, uint16_t b_minor)
+version_compare(uint32_t a_major, uint32_t a_minor,
+                uint32_t b_major, uint32_t b_minor)
 {
-    int a, b;
+    if (a_major > b_major)
+        return 1;
+    if (a_major < b_major)
+        return -1;
+    if (a_minor > b_minor)
+        return 1;
+    if (a_minor < b_minor)
+        return -1;
 
-    a = a_major << 16 | a_minor;
-    b = b_major << 16 | b_minor;
-
-    return (a - b);
+    return 0;
 }
 
 /* some macros to help swap requests, replies, and events */
commit 416ea95d8018875ed77a46634e5ab4d8b6e94dec
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Sat May 24 20:05:53 2014 +1000

    man: drop specific mention of DontZap in -retro (#71113)
    
    DontZap off is the default anyway, don't mention it specifically to avoid
    confusion
    
    X.Org Bug 71113 <http://bugs.freedesktop.org/show_bug.cgi?id=71113>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit cfaf2abbac3f01e57d00845d8908bf01559263f9)

diff --git a/man/Xserver.man b/man/Xserver.man
index b103551..7a74e85 100644
--- a/man/Xserver.man
+++ b/man/Xserver.man
@@ -223,9 +223,8 @@ turns on auto-repeat.
 .B -retro
 starts the stipple with the classic stipple and cursor visible.  The default
 is to start with a black root window, and to suppress display of the cursor
-until the first time an application calls XDefineCursor().  For the Xorg
-server, this also sets the default for the DontZap option to FALSE.  For
-kdrive servers, this implies -zap.
+until the first time an application calls XDefineCursor(). For kdrive
+servers, this implies -zap.
 .TP 8
 .B \-s \fIminutes\fP
 sets screen-saver timeout time in minutes.
commit 18f3471a05a7fba19713c788ed92e5e2ea7a4452
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Sat May 24 20:02:56 2014 +1000

    xfree86: fix wrong DontZap documentation (#71113)
    
    X.Org Bug 71113 <http://bugs.freedesktop.org/show_bug.cgi?id=71113>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit e48a132b6d187f355abd7021be47edde972e7091)

diff --git a/hw/xfree86/xorgconf.cpp b/hw/xfree86/xorgconf.cpp
index cd6d4a9..a903438 100644
--- a/hw/xfree86/xorgconf.cpp
+++ b/hw/xfree86/xorgconf.cpp
@@ -97,7 +97,7 @@ Section "ServerFlags"
 # Uncomment this to disable the <Ctrl><Alt><BS> server abort sequence
 # This allows clients to receive this key event.
 
-#    Option	"DontZap"	"false"
+#    Option	"DontZap"	"true"
 
 # Uncomment this to disable the <Ctrl><Alt><KP_+>/<KP_-> mode switching
 # sequences.  This allows clients to receive these key events.
commit 57a042682029d009094a59914d6044b57ebf209b
Author: Matt Dew <marcoz at osource.org>
Date:   Sun Jun 22 22:11:48 2014 -0600

    Bump version # to 1.15.1.901

diff --git a/configure.ac b/configure.ac
index b7b78a4..ea4f321 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,9 +26,9 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.15.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2014-04-13"
-RELEASE_NAME="Heart Candy"
+AC_INIT([xorg-server], 1.15.1.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2014-06-22"
+RELEASE_NAME="Malt Candy"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AC_USE_SYSTEM_EXTENSIONS


More information about the Xquartz-changes mailing list