Fatal warnings in client code

René J.V. Bertin rjvbertin at gmail.com
Mon Mar 6 20:35:13 UTC 2023


On Monday March 06 2023 16:53:41 Thomas Kluyver wrote:

>> vulnerability. The default build-time configuration for libdbus is to
>> include "checks" that diagnose these programming errors when it is
>> straightforward to do so, by causing a deterministic crash that can
>> be investigated like any other. Typically these "checks" will detect

I agree with the OP that this is not recommendable behaviour for a library. If you can cause a deliberate crash you can also almost always also return an error that allows the calling code to handle the situation gracefully (and correct the bug). I know it's the annoying part of coding but it's not like DBus isn't a mature and well-maintained piece of software where all the easy-out error handling could have been made more constructive.

In an ideal world the devs of the calling code would catch all those bugs and the resulting crashes but in practice they'll only catch the most obvious ones. The remaining ones will all be in the face of users who just happen to play the role of fool proofer...

My 2 cents (that aren't up for debate)..

R.


More information about the dbus mailing list