Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* CRIS port; frame cleanup crash
@ 2003-08-11 13:30 Orjan Friberg
  2003-08-12 15:11 ` Orjan Friberg
  2003-08-12 17:36 ` Andrew Cagney
  0 siblings, 2 replies; 12+ messages in thread
From: Orjan Friberg @ 2003-08-11 13:30 UTC (permalink / raw)
  To: gdb-patches

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-02-18 17:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11 13:30 CRIS port; frame cleanup crash Orjan Friberg
2003-08-12 15:11 ` Orjan Friberg
2003-08-12 17:36 ` Andrew Cagney
2003-08-13 10:17   ` Orjan Friberg
2004-02-12 18:59   ` Orjan Friberg
2004-02-12 20:06     ` Andrew Cagney
2004-02-14 13:38       ` Orjan Friberg
2004-02-14 14:52         ` Andrew Cagney
2004-02-15 17:41           ` Orjan Friberg
2004-02-16 18:19           ` Orjan Friberg
2004-02-16 18:43             ` Andrew Cagney
2004-02-18 17:06               ` Orjan Friberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox