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

Re: [PATCH] abort or assert?

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-11-10 02:21:25 CET

Julian Foad wrote:

> This patch converts aborts into asserts where it seems most appropriate.

I think you'll have to define what "appropriate" means in this context
before we dare commit any changes. Interestingly enough, HACKING says
nothing about assert vs. abort, so our usage patterns mostly grew from
general consensus and code reviews. Thnking back on this, I find the
situation a bit frightening because, as I said in earlier posts,
changing an abort to an assert could mean the difference between a crash
and data corruption.

I'd suggest we use assert in favour of abort only when we can prove that
disabling the assert can't result wrong behaviour -- i.e., when the
assert is truly a debugging aid used to find a bug earlier, but the
presence of the assert doesn't affect an invariant.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 10 02:21:27 2004

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.