This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: Crasher in dwarf2-frame.c - memory reuse


On Mon, Jun 16, 2003 at 05:00:20PM -0400, Andrew Cagney wrote:

>So, reread_symbols frees the objfile, but does not clear sym_private. >Clearing it in reread_symbols fixes the crash, but presumably leaks >memory. How are we supposed to clean up the FDE list?


fde = (struct dwarf2_fde *) obstack_alloc (&unit->objfile->psymbol_obstack, sizeof (struct dwarf2_fde));

so won't the symbol table free, free that memory?


Silly me.  I thought it was malloc'd.  In that case the fix is obvious;
I'll get it in a little bit.

[it was one of the things I noted when giving marks patch the once over - it got rid of michaelL's memory leak]


BTW, there are lots of other places that should also use obstacks - the architecture vector for instance.

Andrew



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