[Gllug] C/C++ mentor

Daniel P. Berrange dan at berrange.com
Fri Nov 24 04:23:04 UTC 2006


On Thu, Nov 23, 2006 at 11:02:11PM +0000, Nix wrote:
> On 23 Nov 2006, Daniel P. Berrange uttered the following:
> > NB. I'm maintainer of the DBus  Perl bindings & can assure you there
> > is nothing in them remotely related to X, GTK, KDE, or any other 
> > desktop-y bits.
> 
> So what's your opinion of libdbus-1.0.0+'s charming `check failed? we
> SIGABRT you' failure mode? If it stays it seems very unlikely that D-Bus
> will be used by many important services: keeping those services running
> is often far more important than sending notification messages out.

Well, its a tricky / interesting problem. These assertions are identifying
real programming flaws, so while I certainly do want key system services
to run reliably, I equally don't want these flaws being allowed through
to potentially become security exploits. These checks are usually only
enabled when dbus is built with assertion checking enabled - in production
release builds 95% of them disappear to be no-ops.

There was one particularly annoying check though that seems to have
caused a hell of alot of pain. The API contract of one method was
changed shortly before the 1.0 release. In doing so an assertion check
was added to easily detect apps relying on the old semantics. In
retrospect though, this was probably a mistake because its caused a
lot of unneccessary & very user visible pain during this transition
phrase where apps adapt to new API semantics.

Finally it is worth noting that it really isn't intended for application
developers to be using the core libdbus.so directly in most cases. It
was expected that in the general case people would use the higher 
level language bindings, eg python, glib, qt, perl, java, etc. These
bindings mask most of the low-level messaging APIs, providing a high
level API more easily used by app developers. In doing so, these high
level APIs would protect apps from the possibility of violating any of 
the assertion checks.

Regards,
Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20061124/2678f17e/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list