This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IA64 exception handling memory leak


On Mon, Apr 01, 2002 at 03:29:36PM -0800, Boehm, Hans wrote:
> Peter Buhr supplied a small test program to David Mosberger that repeatedly
> throws exceptions.  He pointed out that on IA64 compiled with gcc3.x this
> leaks on the order of Gigabytes a second.

Yes.  As it happens I found that last night, and just posted a fix.

  http://gcc.gnu.org/ml/gcc-patches/2002-04/msg00030.html

> Apparently on most architectures the frame state is a single structure
> which requires no dynamic allocation.

Actually, this isn't true.  It's just that I've structured the
dwarf2 unwind interpreter such that we can use alloca for the
state saving.  It's thus automatically freed at the end of 
execute_cfa_program.

> On IA64 it's more complicated and has fields that require deallocation.

Yes, but the point that you missed is that these fields may
be deallocated immediately after interpreting all of the
unwind data.  After that, it's only the "current" data that
matters.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]