summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2006-05-21 05:33:52 +0000
committerHavoc Pennington <hp@redhat.com>2006-05-21 05:33:52 +0000
commit5bc9dc5cf03d05feb62f0e28e2d5e04faf33610b (patch)
tree16629b265e8545ae1520942ba7235b4ae233ef15
parente2f5ba2280a42978d27113b7ffcadd910c38a363 (diff)
2006-05-21 Havoc Pennington <hp@redhat.com>
* glib/dbus-gproxy.c: Put in a pile of assertions that the proxy name is not NULL when it shouldn't be. Also a couple of possible fixes for #4637 though I don't understand why the bug happens, to be honest... also the object constructor has an assert name != NULL and the name is only currently NULL for peer-to-peer proxies that I don't think anyone uses? So it should be asserting. Anyway, for now at least see if we get an earlier assertion failure. * glib/dbus-gvalue-utils.c: Put in a couple of assertions for apparently broken code to be sure the tests fail and someone will fix them...
-rw-r--r--ChangeLog14
-rw-r--r--glib/dbus-gvalue-utils.c15
2 files changed, 29 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a0a485f0..83414418 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-05-21 Havoc Pennington <hp@redhat.com>
+
+ * glib/dbus-gproxy.c: Put in a pile of assertions that the proxy name
+ is not NULL when it shouldn't be. Also a couple of possible fixes
+ for #4637 though I don't understand why the bug happens, to be
+ honest... also the object constructor has an assert name != NULL
+ and the name is only currently NULL for peer-to-peer proxies that
+ I don't think anyone uses? So it should be asserting.
+ Anyway, for now at least see if we get an earlier assertion failure.
+
+ * glib/dbus-gvalue-utils.c: Put in a couple of assertions for
+ apparently broken code to be sure the tests fail and someone
+ will fix them...
+
2006-05-07 Thiago Macieira <thiago.macieira@trolltech.com>
* qt/qdbusmarshall.cpp: Fix a problem of demarshalling lists
diff --git a/glib/dbus-gvalue-utils.c b/glib/dbus-gvalue-utils.c
index 39b4cd9b..b2098398 100644
--- a/glib/dbus-gvalue-utils.c
+++ b/glib/dbus-gvalue-utils.c
@@ -939,6 +939,11 @@ slist_copy_elt (const GValue *val, gpointer user_data)
g_value_init (&val_copy, G_VALUE_TYPE (val));
g_value_copy (val, &val_copy);
+ /* The slist_append can't work if this fails, and
+ * I'm pretty sure it will fail too FIXME
+ */
+ g_assert(dest != NULL);
+
g_slist_append (dest, ptrarray_value_from_gvalue (&val_copy));
}
@@ -1292,7 +1297,17 @@ _dbus_gvalue_utils_test (const char *datadir)
g_assert (!strcmp ("bar", g_ptr_array_index (instance, 1)));
g_assert (!strcmp ("baz", g_ptr_array_index (instance, 2)));
+ /* FIXME this crashes, I believe because ptrarray_append
+ * doesn't copy the incoming static string, then ptrarray_free
+ * tries to free it; looks to me like always copying appended
+ * values would be the only working approach.
+ */
g_value_unset (&val);
+ /* FIXME make sure this test fails for everyone, since
+ * apparently people didn't see it, the bad free
+ * maybe didn't crash everywhere
+ */
+ g_assert_not_reached();
}
type = dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_UINT, DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);