[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: Branko Čibej <brane_at_xbc.nu>
Date: 2007-04-30 20:22:00 CEST

Jonathan Gilbert wrote:
> What about -- on platforms that support it -- allowing the project calling
> into the library to provide a jmp_buf to be longjmp()ed to instead of
> abort()ing, and replacing the abort() calls with calls to a wrapper
> function to pick between that and abort() if the user hasn't provided a
> jmp_buf (or the platform doesn't support it)?
>

The number of implicit +1s to this proposal really make hair stand on end.

The following really applies to any kind of abort() alternative, but
longjmp sticks out.

    * How do you get the right jmp_buf to all the necessary places in
      all the Subversion libraries? we don't pass around a context
      object where it could be stored.
    * What do you do with dangling resources (open files, etc.) that
      can't be cleaned up after a longjmp?
    * How do you safely do /anything/ but end the process after you
      catch a longjmp?

In other words: how is the cure not worse than the disease?

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 30 20:22:14 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.