From: Johannes Sixt Date: Fri, 16 Mar 2007 08:06:51 GMT Subject: Re: Libification project (SoC) Message-ID: <45FA501B.FA5B9F30@eudaptics.com> In-Reply-To: <20070316045928.GB31606@spearce.org> "Shawn O. Pearce" wrote: > "Luiz Fernando N. Capitulino" 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