rpms/xorg-x11-server/F-12 xserver-1.7.3-no-free-on-abort.patch, NONE, 1.1 xorg-x11-server.spec, 1.516, 1.517
Adam Jackson
ajax at fedoraproject.org
Thu Jan 7 17:05:51 UTC 2010
Author: ajax
Update of /cvs/pkgs/rpms/xorg-x11-server/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5659
Modified Files:
xorg-x11-server.spec
Added Files:
xserver-1.7.3-no-free-on-abort.patch
Log Message:
* Thu Jan 07 2010 Adam Jackson <ajax at redhat.com> 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.
xserver-1.7.3-no-free-on-abort.patch:
dix/globals.c | 2 ++
include/misc.h | 2 ++
os/log.c | 1 +
os/utils.c | 4 +++-
4 files changed, 8 insertions(+), 1 deletion(-)
--- NEW FILE xserver-1.7.3-no-free-on-abort.patch ---
>From 3bf24ed9e1c81116c851ba2408b9c37a51a5dc62 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
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
Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-12/xorg-x11-server.spec,v
retrieving revision 1.516
retrieving revision 1.517
diff -u -p -r1.516 -r1.517
--- xorg-x11-server.spec 5 Jan 2010 04:08:15 -0000 1.516
+++ xorg-x11-server.spec 7 Jan 2010 17:05:51 -0000 1.517
@@ -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.pat
# 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 <ajax at redhat.com> 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 <peter.hutterer at redhat.com> 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)
More information about the fedora-extras-commits
mailing list