- Do not catch segv etc. let abrt catch them

epel9
Colin Walters 15 years ago
parent 70cd5e1abf
commit 1397558ad7

@ -0,0 +1,97 @@
From 33c73a785c79ecef125a53af29581d09f9ab3733 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Mon, 1 Feb 2010 13:02:11 -0500
Subject: [PATCH] [gconfd] Remove (worse than) useless signal handlers for SEGV, FPE, etc
Modern operating systems like Fedora tend to include system-wide crash
handlers (like ABRT) which operate by processing unhandled crashes
(signals such as SIGSEGV). By catching SIGSEGV but actually doing
nothing with it, GConf is breaking these crash handlers.
Delete all of the handlers for signals like SIGFPE, SIGSEGV which can't
be treated as recoverable.
https://bugzilla.gnome.org/show_bug.cgi?id=608705
---
gconf/gconfd.c | 37 -------------------------------------
1 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/gconf/gconfd.c b/gconf/gconfd.c
index fe5d18a..38a8423 100644
--- a/gconf/gconfd.c
+++ b/gconf/gconfd.c
@@ -119,8 +119,6 @@ static GConfDatabase* obtain_database (GSList *addresses,
static void drop_old_databases (void);
static gboolean no_databases_in_use (void);
-static void gconf_handle_segv (int signum);
-
/*
* Flag indicating that we are shutting down, so return errors
* on any attempted operation. We do this instead of unregistering with
@@ -431,22 +429,6 @@ signal_handler (int signo)
++in_fatal;
switch (signo) {
- /* Fast cleanup only */
- case SIGSEGV:
-#ifdef SIGBUS
- case SIGBUS:
-#endif
- case SIGILL:
- enter_shutdown ();
-#ifndef G_OS_WIN32
- if (g_getenv ("DISPLAY"))
- gconf_handle_segv (signo);
-#else
- gconf_handle_segv (signo);
-#endif
- abort ();
- break;
-
case SIGFPE:
#ifdef SIGPIPE
case SIGPIPE:
@@ -844,28 +826,16 @@ main(int argc, char** argv)
act.sa_mask = empty_mask;
act.sa_flags = 0;
sigaction (SIGTERM, &act, NULL);
- sigaction (SIGILL, &act, NULL);
- sigaction (SIGBUS, &act, NULL);
- sigaction (SIGFPE, &act, NULL);
sigaction (SIGHUP, &act, NULL);
- sigaction (SIGSEGV, &act, NULL);
- sigaction (SIGABRT, &act, NULL);
sigaction (SIGUSR1, &act, NULL);
act.sa_handler = SIG_IGN;
sigaction (SIGINT, &act, NULL);
#else
signal (SIGTERM, signal_handler);
- signal (SIGILL, signal_handler);
-#ifdef SIGBUS
- signal (SIGBUS, signal_handler);
-#endif
- signal (SIGFPE, signal_handler);
#ifdef SIGHUP
signal (SIGHUP, signal_handler);
#endif
- signal (SIGSEGV, signal_handler);
- signal (SIGABRT, signal_handler);
#ifdef SIGUSR1
signal (SIGUSR1, signal_handler);
#endif
@@ -2710,10 +2680,3 @@ client_count (void)
return g_hash_table_size (client_table);
}
-
-static void
-gconf_handle_segv (int signum)
-{
- return;
-}
-
--
1.6.6

@ -7,7 +7,7 @@
Summary: A process-transparent configuration system
Name: GConf2
Version: 2.28.0
Release: 5%{?dist}
Release: 6%{?dist}
License: LGPLv2+
Group: System Environment/Base
Source: http://download.gnome.org/sources/GConf/2.28/GConf-%{version}.tar.bz2
@ -42,6 +42,8 @@ Patch1: GConf-gettext.patch
Patch2: no-access-crash.patch
# upstream fix
Patch3: 0001-Make-the-defaults-mechanism-find-the-right-polkit-ac.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=608705
Patch4: 0001-gconfd-Remove-worse-than-useless-signal-handlers-for.patch
%description
GConf is a process-transparent configuration database API used to
@ -80,6 +82,7 @@ which require GTK+.
%patch1 -p1 -b .gettext
%patch2 -p1 -b .no-access
%patch3 -p1 -b .defaults-actions
%patch4 -p1 -b .segv
autoreconf -f -i
@ -157,6 +160,9 @@ fi
%{_libdir}/pkgconfig/*
%changelog
* Mon Feb 01 2010 Colin Walters <walters@verbum.org> 2.28.0-6
- Do not catch segv etc. let abrt catch them
* Thu Jan 28 2010 Ray Strode <rstrode@redhat.com> 2.28.0-5
- Add defattr directive to gtk subpackage files section

Loading…
Cancel
Save