diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index c3a7fdf..16d4dee 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -19,7 +19,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.7.3 -Release: 8%{dist} +Release: 9%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -86,6 +86,7 @@ Patch6068: xserver-1.7.3-fb-backport.patch # sent to list, should be upstream with next release Patch6069: xserver-1.7.3-cursor-jumps.patch +Patch6070: xserver-1.7.3-no-free-on-abort.patch %define moduledir %{_libdir}/xorg/modules %define drimoduledir %{_libdir}/dri @@ -514,6 +515,11 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Thu Jan 07 2010 Adam Jackson 1.7.3-9 +- xserver-1.7.3-no-free-on-abort.patch: Elide calling free() on abnormal + server exit, since if we're exiting due to malloc arena corruption, that + will deadlock. + * Tue Jan 05 2010 Peter Hutterer 1.7.3-8 - xserver-1.7.3-cursor-jumps.patch: don't jump to 0/0 after hitting a key one a key+valuator device (#548938) diff --git a/xserver-1.7.3-no-free-on-abort.patch b/xserver-1.7.3-no-free-on-abort.patch new file mode 100644 index 0000000..6630d05 --- /dev/null +++ b/xserver-1.7.3-no-free-on-abort.patch @@ -0,0 +1,65 @@ +From 3bf24ed9e1c81116c851ba2408b9c37a51a5dc62 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Thu, 7 Jan 2010 11:33:43 -0500 +Subject: [PATCH] hack to make abnormal exit not call free() + +--- + dix/globals.c | 2 ++ + include/misc.h | 2 ++ + os/log.c | 1 + + os/utils.c | 3 +++ + 4 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/dix/globals.c b/dix/globals.c +index c1e64d3..a1eac08 100644 +--- a/dix/globals.c ++++ b/dix/globals.c +@@ -61,6 +61,8 @@ SOFTWARE. + #include "dixstruct.h" + #include "os.h" + ++Bool omg_wtf_aborting = FALSE; ++ + ScreenInfo screenInfo; + KeybdCtrl defaultKeyboardControl = { + DEFAULT_KEYBOARD_CLICK, +diff --git a/include/misc.h b/include/misc.h +index 877c682..2b3cf2e 100644 +--- a/include/misc.h ++++ b/include/misc.h +@@ -286,4 +286,6 @@ typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */ + extern _X_EXPORT unsigned long globalSerialNumber; + extern _X_EXPORT unsigned long serverGeneration; + ++extern _X_EXPORT Bool omg_wtf_aborting; ++ + #endif /* MISC_H */ +diff --git a/os/log.c b/os/log.c +index 8108890..79b86f3 100644 +--- a/os/log.c ++++ b/os/log.c +@@ -395,6 +395,7 @@ void AbortServer(void) __attribute__((noreturn)); + void + AbortServer(void) + { ++ omg_wtf_aborting = 1; + #ifdef XF86BIGFONT + XF86BigfontCleanup(); + #endif +diff --git a/os/utils.c b/os/utils.c +index 1d1712d..04177aa 100644 +--- a/os/utils.c ++++ b/os/utils.c +@@ -1164,6 +1164,9 @@ XNFrealloc(pointer ptr, unsigned long amount) + void + Xfree(pointer ptr) + { ++ if (omg_wtf_aborting) ++ return; ++ + if (ptr) + free(ptr); + } +-- +1.6.5.2 +