[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [RFC] Replacement for "assert" in the libraries

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 13 Jun 2008 17:57:42 +0100

WAIT!!!

No flames.

Could I urge everyone to think and write with careful consideration and
clarity, and not make unstated assumptions about what I or anyone else
meant.

Apologies that I didn't write clearly and carefully what I was thinking
of. I'd forgotten how difficult this subject is for people to dicuss and
agree on.

I'll give my technical reply when I've had time to take more care in
writing it.

- Julian

On Fri, 2008-06-13 at 18:53 +0200, Stefan Kng wrote:
> Branko ibej wrote:
> > I disagree with this idea. Very very much in fact. It's contrary to the
> > API implementation rules we set up from day one -- one of which says
> > that our API will not validate parameters. Also it would mean that all
> > functions that use assert but happen not to return an svn_eror_t would
> > have to be revved.
> >
> > The above implies that
> >
> > * assert should only be used for "this can't happen" sanity checks
>
> I disagree: assert should *never* be used, unless it's enclosed in
> #ifdef _DEBUG statements.
>
> > * it should be turned off in production code (which is what we do on
> > Windows, IIRC).
>
> Not really. The c-runtime assert() function is still used in a release
> build.
>
> See issue 2780:
> http://subversion.tigris.org/issues/show_bug.cgi?id=2780
>
> I've asked for the removal of asserts and aborts several times already,
> and I think I made my reasons very clear for that.
> And as you can see from that issue, I'm not the only one who has many
> problems because of those asserts and aborts.
>
> (that's also why I'm still considering dropping serf for the TSVN 1.5
> release - it has way too many aborts in places where an error should be
> returned instead).
>
>
> Stefan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-13 18:58:19 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.