CRIS port; frame cleanup crash
Orjan Friberg
orjan.friberg@axis.com
Mon Aug 11 13:30:00 GMT 2003
After a long overdue update of my gdb cvs tree, I found that something
broke late March/early April. I don't quite understand what goes on,
but it seems to happen the first time a frame allocated by
deprecated_frame_xmalloc_with_cleanup is freed by do_cleanups (which
happens in cris_skip_prologue_main). gdb segfaults on a call to free
with a pointer to that frame. The arm-tdep.c file contains the same
construct of:
old_chain = make_cleanup (null_cleanup, NULL);
frame = deprecated_frame_xmalloc_with_cleanup (..., ...)
<do something with frame>
do_cleanups (old_chain);
The only thing I found that looked suspicous was that the frame variable
is allocated by a call to obstack_alloc, but free'd with a "normal" call
to free. I would have guessed it should be with obstack_free, but then
again, my understanding of what happens is limited so far.
Any pointers or suggestions are appreciated.
--
Orjan Friberg
Axis Communications
More information about the Gdb-patches
mailing list