apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apr-util/include apr_md4.h
Date Mon, 04 Jun 2001 19:08:34 GMT
"Sander Striker" <striker@samba-tng.org> writes:

> Oops, sorry. I was thinking from the library point of view
> where all errors should be handled. If the policy is segfaulting
> when NULL pointers are passed that makes sense to me.
> However, I would suggest putting in something like:
> #ifdef APR_MD4_DEBUG
>     assert(context);
> #endif

I'm got opposed to asserts in general, but I wonder what we'd achieve
with one here.  I would think that without the assert we still die and the
problem should be diagnosable from a core dump.  With the message from
such an assert from some random program somebody still has to go find
the source code to apr-util and see what the assert means.  The assert
doesn't tell how they got to that point so the core dump is still
required to debug it.  And we get the core dump for free.

Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message