Debian Bug report logs -
#541632
libdbus-glib-1-2: wonky results from dbus_g_proxy_call
Reported by: Andres Salomon <dilinger@collabora.co.uk>
Date: Sat, 15 Aug 2009 00:30:02 UTC
Severity: normal
Tags: patch, upstream
Found in version dbus-glib/0.82-1
Fixed in version dbus-glib/0.84-1
Done: Michael Biebl <biebl@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#541632; Package libdbus-glib-1-2.
(Sat, 15 Aug 2009 00:30:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Andres Salomon <dilinger@collabora.co.uk>:
New Bug report received and forwarded. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>.
(Sat, 15 Aug 2009 00:30:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: libdbus-glib-1-2
Version: 0.82-1
I have the following bit of code:
ofono = dbus_g_proxy_new_for_name (dbus,
"org.ofono", "/", "org.ofono.at.Manager");
if (!dbus_g_proxy_call (ofono, "Create", &e,
G_TYPE_STRING, priv->device, G_TYPE_STRING, "at", G_TYPE_INVALID,
// DBUS_TYPE_G_PROXY, &priv->modem, G_TYPE_INVALID))
G_TYPE_STRING, &m, G_TYPE_INVALID))
Now, it turns out that the signature for this method is:
Create(s,s) -> (o)
Clearly, this (client) code is wrong; dbus_g_proxy_call returns FALSE,
as it should. However, 'e' remains NULL. The reasons for this is
interesting..
The method is called, and dbus_g_proxy_end_call_internal is called to
handle the result. It calls _dbus_gvalue_demarshal, which returns FALSE
but doesn't set any errors. _dbus_gvalue_demarshal is calling
the demarshaller callback, which actually calls demarshal_basic.
demarshal_basic has a large switch() statement, which looks at the
type. The type is ((int)'o') (ie, DBUS_TYPE_OBJECT_PATH); this
doesn't match against anything in the switch statement, so the
'default' block is run.
default:
g_assert_not_reached ();
return FALSE;
}
Thus, 'error' is never set, and an assertion that's never supposed to
be reached is reached. It should probably just 'goto invalid_type;' or
something..
Information forwarded
to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#541632; Package libdbus-glib-1-2.
(Sat, 15 Aug 2009 00:51:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Andres Salomon <dilinger@collabora.co.uk>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>.
(Sat, 15 Aug 2009 00:51:03 GMT) (full text, mbox, link).
Message #10 received at 541632@bugs.debian.org (full text, mbox, reply):
tags 541632 + upstream patch
thanks
From 72d42430f2140dfc1675232c9d6b77b100ad1e5b Mon Sep 17 00:00:00 2001
From: Andres Salomon <dilinger@collabora.co.uk>
Date: Fri, 14 Aug 2009 20:35:17 -0400
Subject: [PATCH] dbus-gvalue: set an error when demarshal_basic doesn't recognize type
By passing dbus_g_proxy_call an incorrect signature, we can cause
the function to fail but not provide any error message. This isn't
helpful. This patch causes it to set an error when demarshalling
a type that it's not expecting. Instead of a NULL error, one instead
sees something like the following when the method returns a path
object but the client expected a string:
modem Create() failed: Expected type gchararray, got type code 'o'
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
---
dbus/dbus-gvalue.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c
index 49ae16e..02c7d7a 100644
--- a/dbus/dbus-gvalue.c
+++ b/dbus/dbus-gvalue.c
@@ -586,7 +586,7 @@ demarshal_basic (DBusGValueMarshalCtx *context,
}
default:
g_assert_not_reached ();
- return FALSE;
+ goto invalid_type;
}
invalid_type:
g_set_error (error,
--
1.6.3.3
Added tag(s) upstream and patch.
Request was from Andres Salomon <dilinger@collabora.co.uk>
to control@bugs.debian.org.
(Sat, 15 Aug 2009 00:51:04 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#541632; Package libdbus-glib-1-2.
(Fri, 21 Aug 2009 22:48:08 GMT) (full text, mbox, link).
Acknowledgement sent
to Andres Salomon <dilinger@collabora.co.uk>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>.
(Fri, 21 Aug 2009 22:48:08 GMT) (full text, mbox, link).
Message #17 received at 541632@bugs.debian.org (full text, mbox, reply):
In case this gets lost upstream, please consider adding this to the
debian package. This is what I ended up sending upstream.
By passing dbus_g_proxy_call an incorrect signature, we can cause
the function to fail but not provide any error message (if
G_DISABLE_ASSERT is defined). As smvc pointed out, this can also
become a runtime error when a telepathy CM changes signature, but
the client hasn't been updated. As such, g_assert isn't an appropriate
action. See http://bugs.debian.org/541632 for more information.
This patch causes it to set an error when demarshalling a type that it's
not expecting. Instead of a NULL error, one instead
sees something like the following when the method returns a path
object but the client expected a string:
"modem Create() failed: Expected type gchararray, got type code 'o'"
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
---
dbus/dbus-gvalue.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c
index 49ae16e..6ba3663 100644
--- a/dbus/dbus-gvalue.c
+++ b/dbus/dbus-gvalue.c
@@ -585,8 +585,7 @@ demarshal_basic (DBusGValueMarshalCtx *context,
return TRUE;
}
default:
- g_assert_not_reached ();
- return FALSE;
+ /* fall through to invalid_type */
}
invalid_type:
g_set_error (error,
--
1.6.3.3
Reply sent
to Michael Biebl <biebl@debian.org>:
You have taken responsibility.
(Mon, 01 Feb 2010 16:36:04 GMT) (full text, mbox, link).
Notification sent
to Andres Salomon <dilinger@collabora.co.uk>:
Bug acknowledged by developer.
(Mon, 01 Feb 2010 16:36:04 GMT) (full text, mbox, link).
Message #22 received at 541632-close@bugs.debian.org (full text, mbox, reply):
Source: dbus-glib
Source-Version: 0.84-1
We believe that the bug you reported is fixed in the latest version of
dbus-glib, which is due to be installed in the Debian FTP archive:
dbus-glib_0.84-1.diff.gz
to main/d/dbus-glib/dbus-glib_0.84-1.diff.gz
dbus-glib_0.84-1.dsc
to main/d/dbus-glib/dbus-glib_0.84-1.dsc
dbus-glib_0.84.orig.tar.gz
to main/d/dbus-glib/dbus-glib_0.84.orig.tar.gz
libdbus-glib-1-2-dbg_0.84-1_i386.deb
to main/d/dbus-glib/libdbus-glib-1-2-dbg_0.84-1_i386.deb
libdbus-glib-1-2_0.84-1_i386.deb
to main/d/dbus-glib/libdbus-glib-1-2_0.84-1_i386.deb
libdbus-glib-1-dev_0.84-1_i386.deb
to main/d/dbus-glib/libdbus-glib-1-dev_0.84-1_i386.deb
libdbus-glib-1-doc_0.84-1_all.deb
to main/d/dbus-glib/libdbus-glib-1-doc_0.84-1_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 541632@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Michael Biebl <biebl@debian.org> (supplier of updated dbus-glib package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Mon, 01 Feb 2010 16:57:09 +0100
Source: dbus-glib
Binary: libdbus-glib-1-dev libdbus-glib-1-2 libdbus-glib-1-doc libdbus-glib-1-2-dbg
Architecture: source all i386
Version: 0.84-1
Distribution: unstable
Urgency: low
Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Changed-By: Michael Biebl <biebl@debian.org>
Description:
libdbus-glib-1-2 - simple interprocess messaging system (GLib-based shared library)
libdbus-glib-1-2-dbg - simple interprocess messaging system (GLib library debug symbols)
libdbus-glib-1-dev - simple interprocess messaging system (GLib interface)
libdbus-glib-1-doc - simple interprocess messaging system (GLib library documentation)
Closes: 541632
Changes:
dbus-glib (0.84-1) unstable; urgency=low
.
* New upstream release.
- dbus-gvalue: set an error when demarshal_basic doesn't recognize type.
(Closes: #541632)
* debian/patches/10_support_duplicate_object_registrations.patch
- Remove, merged upstream.
* debian/libdbus-glib-1-2.symbols
- Add new dbus_g_bus_get_private symbol.
* debian/rules
- Bumps shlibs to >= 0.84.
* debian/control
- Bump Standards-Version to 3.8.4. No further changes.
- Bump Build-Depends on debhelper to (>= 7).
* debian/compat
- Bump debhelper compat level to 7.
Checksums-Sha1:
5c6cc93525fc3e7fba6aaaf437badf0bbcee28ab 1562 dbus-glib_0.84-1.dsc
94d06266aa9b851f46bcd6a774e54256d44d36e8 679310 dbus-glib_0.84.orig.tar.gz
0510215788b2490ed5d518f32a0e028218358a26 17714 dbus-glib_0.84-1.diff.gz
f8af443701c4f1e6833b5cd5fd0a2876a5c62ac6 140748 libdbus-glib-1-doc_0.84-1_all.deb
07797abd9f6b6965dc11d08e2713a9c879165d9f 202414 libdbus-glib-1-dev_0.84-1_i386.deb
6923ea72d6e28929bc13adb0290106554ca23b5e 158662 libdbus-glib-1-2_0.84-1_i386.deb
01e53ce3451e6c97d114ce9ed23ab9baa2f78c63 152756 libdbus-glib-1-2-dbg_0.84-1_i386.deb
Checksums-Sha256:
01df43360c75bcb4b14fafada1f021df0bfa67716192f5f12f72eb44b57c42a7 1562 dbus-glib_0.84-1.dsc
60ca7df1626cc7220863f22fab1ab63e0d904daf737f3b43fc26e8e77774b7a9 679310 dbus-glib_0.84.orig.tar.gz
21d9af9cd3298b1c416a7e81daf566a0d8f2483e5db11a04fa4013d224f07dac 17714 dbus-glib_0.84-1.diff.gz
04871e43971453a033037d13077fcec2748a5a4729e4783e3b978f69dec3c9c1 140748 libdbus-glib-1-doc_0.84-1_all.deb
8f2b3714ad3e4a020c54368641a52ab2cd3ae2b5b0e5273cf21b774200dd9548 202414 libdbus-glib-1-dev_0.84-1_i386.deb
6f411607f1653e6c0023bba143a153079cfd1d4d3d33b73a5e5a8de4c12816c7 158662 libdbus-glib-1-2_0.84-1_i386.deb
d04a8786b50f0ccee5b76851ae7f33bf90d6fc3cded63666b6ced0238c9fa5e2 152756 libdbus-glib-1-2-dbg_0.84-1_i386.deb
Files:
a4fb000b34041bd9157122cc84c7804e 1562 devel optional dbus-glib_0.84-1.dsc
69fbe31fb3ee778715dff44cdd5178bf 679310 devel optional dbus-glib_0.84.orig.tar.gz
adf5310040c680c01874dc724869ea71 17714 devel optional dbus-glib_0.84-1.diff.gz
e2458c5f0db2f0b62f24a2941700e1c1 140748 doc optional libdbus-glib-1-doc_0.84-1_all.deb
9c5388d699143bd749289b4173402068 202414 libdevel optional libdbus-glib-1-dev_0.84-1_i386.deb
94a322d83b09ec812f13c5b926c4ab67 158662 libs optional libdbus-glib-1-2_0.84-1_i386.deb
e8e9c99ef60f7665560005fc990c2609 152756 debug extra libdbus-glib-1-2-dbg_0.84-1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAktm/vkACgkQh7PER70FhVTJIgCglfFy10vG0MsiLHtBQEXJ+QSy
vqsAoIbeXdRf7HMUCj+Pe5GI9b4HczFt
=dUR+
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 12 Mar 2010 07:32:25 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jan 7 23:31:49 2018;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.