Re: Libification project (SoC)
- From
Johannes Sixt <j.sixt@eudaptics.com>
- Date
- Mar 16, 2007, 08:06 UTC
- Message-ID
- <45FA501B.FA5B9F30@eudaptics.com>
- In-Reply-To
- <20070316045928.GB31606@spearce.org>
"Shawn O. Pearce" wrote:
Show 7 quoted lines
> "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br> wrote: > > o Avoid dying when a function call fails (eg, malloc()) > > malloc is a huge problem in the Git code today. Almost all > of our malloc calls are actually through the xmalloc wrapper. > All xmalloc callers assume xmalloc will *never* fail. This > makes it, uh, interesting. ;-)
You could think about longjmp(3)ing out into main(), which would have to setjmp(3). But in order to clean up intermediate frames, you would have to have a stack of setjmp/longjmp buffers.
Oh, well, how do I *love* them C++ exceptions!
-- Hannes