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

Re: abort() calls

From: Jonathan Gilbert <o2w9gs702_at_sneakemail.com>
Date: 2007-04-29 16:28:27 CEST

At 10:25 AM 4/29/2007 +0200, Folker Schamel wrote:
>Stefan KEg wrote:
>> If there's any chance that the apr pools can clean up something, then
>> the subversion lib should return an error and not call abort() at all.
>> Because that's a situation which I would consider as manageable, and
>> such situations should never call abort(). IMHO, abort() should only be
>> used as the absolutely last resort, if really there's absolutely *no*
>> other way to recover.
>
>What situation could that be?

Though it's not part of Subversion's code base, one example that pops to
mind is a corrupt memory heap; what can malloc() and free() do if whatever
structure it is in memory tracks blocks is hopelessly corrupted by stray
pointers elsewhere in the application? That's a perfectly good situation to
raise such an "uncatchable" error.

Of course, a damaged heap makes almost any code execution impossible, but I
can't think that there'd be many things within Subversion that could
irreparably prevent all future calls into Subversion's API within that
process from behaving correctly...

Jonathan Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 29 16:43:13 2007

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.