[Opendnssec-develop] About assert()...

Sara Dickinson sara at sinodun.com
Tue Feb 11 11:49:51 UTC 2014


Hi All, 

I hear lots of valid points, but I’d like to suggest that we take this discussion offline and that the most effective way to reach agreement (or disagreement!) is to add this to the agenda for the upcoming workshop (which will be available later today), where everyone can chip in. 

We are effectively talking about coding guidelines here (something we don’t have?), which seems a good topic for group discussion. Particularly with a major release/complete re-write of the enforcer in progress, this seem a good opportunity to make some decisions. 

Sara.

On 11 Feb 2014, at 08:58, Yuri Schaeffer <yuri at nlnetlabs.nl> wrote:

> Signed PGP part
> > But what if something did call it with NULL, there might be a
> > situation where the system is temporarily out of memory or that is
> > was called from an untested code path or some other strange
> > situation.
> 
> Not a good argument. You should only use assertions when you are sure
> they will _never_ fail whereas you use a regular check if it could
> _possibly_ fail.
> 
> > Is it then our praxis, our coding standard to have the program just
> > die? I’d really hope not.
> 
> I'm sorry I am in favour of dying. You might have a point that
> some/many assertions need to be revised. But I see no objections of
> using asserts where appropriate. It is a debugging tool, it has
> nothing to do with error handling.
> 
> //Yuri
> 
> --
> Composed on an actual keyboard: all typos genuine.
> 
> _______________________________________________
> Opendnssec-develop mailing list
> Opendnssec-develop at lists.opendnssec.org
> https://lists.opendnssec.org/mailman/listinfo/opendnssec-develop




More information about the Opendnssec-develop mailing list