This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sjlj exception and malloc
- To: Steven Parkes <parkes at sierravista dot com>
- Subject: Re: sjlj exception and malloc
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 19 Oct 1998 11:43:42 -0600
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199810160336.UAA20601@monterey.sierravista.com>you write:
> When using sjlj exceptions, malloc gets called very early in order to
> allocate the static eh context. This is a real problem for us because
> we implement our own malloc in C++. The result is infinite recursion.
>
> Because there is only one of these static objects, it's straightforward
> to statically allocate the object and then just do the initialization,
> which breaks the loop. I've observed no negative side effects other
> than the 12 bytes of data space that aren't used when eh_context_static
> isn't used.
I fixed this in a slightly different (cleaner & more efficient) manner.
Thanks for pointing out the problem.
jeff