[GConf2/f17] Potentially fix crasher bug

Ray Strode rstrode at fedoraproject.org
Tue Feb 14 04:55:12 UTC 2012


commit 83be4c17b709075e0d887818b696744a285deee0
Author: Ray Strode <rstrode at redhat.com>
Date:   Mon Feb 13 23:50:30 2012 -0500

    Potentially fix crasher bug
    
    Resolves: #756245

 GConf2.spec       |    9 ++++++++-
 fix-crasher.patch |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/GConf2.spec b/GConf2.spec
index 950e4dd..34e61ab 100644
--- a/GConf2.spec
+++ b/GConf2.spec
@@ -6,7 +6,7 @@
 Summary: A process-transparent configuration system
 Name: GConf2
 Version: 3.2.3
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: LGPLv2+
 Group: System Environment/Base
 #VCS: git:git://git.gnome.org/gconf
@@ -20,6 +20,8 @@ Patch0: GConf-gettext.patch
 Patch1: 0001-Cosmetics-Consistenly-capitalize-messages.patch
 Patch2: 0002-Skip-nonexisting-schemas.patch
 Patch3: 0003-Bump-GIO-dep-to-2.32.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=670033
+Patch4: fix-crasher.patch
 
 BuildRequires: libxml2-devel >= %{libxml2_version}
 BuildRequires: libxslt-devel
@@ -74,6 +76,7 @@ which require GTK+.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1 -b .fix-crasher
 
 autoreconf -i -f
 
@@ -165,6 +168,10 @@ fi
 %doc %{_mandir}/man1/gsettings-schema-convert.1*
 
 %changelog
+* Mon Feb 13 2012 Ray Strode <rstrode at redhat.com> 3.2.3-4
+- Potentially fix crasher bug
+  Resolves: #756245
+
 * Thu Jan 19 2012 Matthias Clasen <mclasen at redhat.com> - 3.2.3-3
 - Don't build the openldap backend
 - Deal gracefully with missing schemas in gsettings-data-convert
diff --git a/fix-crasher.patch b/fix-crasher.patch
new file mode 100644
index 0000000..5d708e8
--- /dev/null
+++ b/fix-crasher.patch
@@ -0,0 +1,52 @@
+From 6f3e127330cb0820a373be77be3cb2cacd0b352e Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Mon, 13 Feb 2012 23:35:06 -0500
+Subject: [PATCH] gconf-dbus: don't crash during sync if gconfd shutting down
+
+The gconfd shuts down after a bit of inactivity.  When that
+happens there's a window where it refuses requests from the
+client library with an error.  The library is resposible for
+gracefully handling this condition and reacting appropriately.
+
+There are many places in the code where the client library has
+this idiom:
+
+db = gconf_engine_get_database (conf, TRUE, err);
+
+if (db == NULL)
+  {
+    g_return_if_fail(err == NULL || *err != NULL);
+
+    return;
+  }
+
+In the event gconfd is shutting down, db will be NULL, and the
+code will return early from whatever (non-critical) operation
+it was doing.
+
+gconf_engine_suggest_sync has a similiar chunk of code, but it
+neglected the "return;" and then promptly crashed since it wasn't
+expecting db to be NULL.
+
+This commit adds the return;
+
+https://bugzilla.gnome.org/show_bug.cgi?id=670033
+---
+ gconf/gconf-dbus.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
+index 9f92125..442a94b 100644
+--- a/gconf/gconf-dbus.c
++++ b/gconf/gconf-dbus.c
+@@ -2029,6 +2029,7 @@ gconf_engine_suggest_sync(GConfEngine* conf, GError** err)
+   if (db == NULL)
+     {
+       g_return_if_fail (err == NULL || *err != NULL);
++      return;
+     }
+   
+   message = dbus_message_new_method_call (GCONF_DBUS_SERVICE,
+-- 
+1.7.9
+


More information about the scm-commits mailing list