24560147 gvfsd core dumps on SIGTRAP with g_logv() at top of stack
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Sat, 03 Sep 2016 22:01:54 -0700
changeset 6739 8e4786e21910
parent 6736 6ad7817ce1b1
child 6740 b9a930b724d2
24560147 gvfsd core dumps on SIGTRAP with g_logv() at top of stack
components/gnome/gvfs/patches/02-monitor-crash.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/gnome/gvfs/patches/02-monitor-crash.patch	Sat Sep 03 22:01:54 2016 -0700
@@ -0,0 +1,36 @@
+Patch from upstream git for Solaris bug 24560147
+https://git.gnome.org/browse/gvfs/commit/?id=77805a9871fcf53e99ccece6509faea77fcf93b4
+
+From 77805a9871fcf53e99ccece6509faea77fcf93b4 Mon Sep 17 00:00:00 2001
+From: Tristan Van Berkom <[email protected]>
+Date: Tue, 6 Oct 2015 15:09:04 +0900
+Subject: [PATCH] Avoid crash when no monitor implementations exist.
+
+The GVariantBuilder is unable to create any GVariant for
+an untyped array - while an empty vector is a valid variant,
+it is not valid for an untyped array.
+
+Passing the resulting null to gvfs_dbus_daemon_complete_cancel()
+causes gvfs to abort with a g_error().
+
+https://bugzilla.gnome.org/show_bug.cgi?id=756105
+---
+ daemon/gvfsdaemon.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
+index 7bc334b..b7a3b88 100644
+--- a/daemon/gvfsdaemon.c
++++ b/daemon/gvfsdaemon.c
[email protected]@ -957,7 +957,7 @@ handle_list_monitor_implementations (GVfsDBusDaemon        *object,
+ 
+   impls = g_vfs_list_monitor_implementations ();
+ 
+-  g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
++  g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ssbia{sv})"));
+ 
+   for (l = impls; l != NULL; l = l->next)
+     {
+-- 
+2.7.4
+