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

Re: pointers and Windows debugging

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2003-01-07 07:10:03 CET

On Mon, 2003-01-06 at 23:35, Justin Erenkrantz wrote:
> Furthermore, a note that I haven't seen yet in this thread is that a
> library should never call assert(). Only applications should call
> assert(). A library that causes a SIGABRT because of a consistency
> failure isn't a library that should be relied upon. It is better to
> error out gracefully. Since the bulk of our code is meant to be used
> as a library, this is, IMHO, a prime concern. -- justin

I don't get it. When code is buggy (either ours or the caller's),
behavior is necessarily undefined. A bug can cause our code to scribble
random data over user files or otherwise destroy people's data. Why
shouldn't a bug be able to cause a SIGABRT?

(We shouldn't abort if we find a corrupt database or entries file, of
course. But I don't think assertions are being used for that purpose.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 7 07:11:09 2003

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