* RFC: missing do_cleanups call in dwarf2_frame_cache
@ 2012-08-02 16:08 Tom Tromey
2012-08-02 16:33 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2012-08-02 16:08 UTC (permalink / raw)
To: gdb-patches
While debugging a different problem, I found a spot in
dwarf2_frame_cache that fails to call do_cleanups before returning. The
usual rule is that ordinary functions should not leave any dangling
cleanups.
Built and regtested on x86-64 Fedora 16.
Tom
* dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before
return.
---
gdb/dwarf2-frame.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 01786ef..741a103 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -1110,6 +1110,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
if (ex.error == NOT_AVAILABLE_ERROR)
{
cache->unavailable_retaddr = 1;
+ do_cleanups (old_chain);
return cache;
}
--
1.7.7.6
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: RFC: missing do_cleanups call in dwarf2_frame_cache
2012-08-02 16:08 RFC: missing do_cleanups call in dwarf2_frame_cache Tom Tromey
@ 2012-08-02 16:33 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2012-08-02 16:33 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 08/02/2012 05:08 PM, Tom Tromey wrote:
> While debugging a different problem, I found a spot in
> dwarf2_frame_cache that fails to call do_cleanups before returning. The
> usual rule is that ordinary functions should not leave any dangling
> cleanups.
>
> Built and regtested on x86-64 Fedora 16.
>
> Tom
>
> * dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before
> return.
Whoops. Ok, of course.
--
Pedro Alves
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-02 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-02 16:08 RFC: missing do_cleanups call in dwarf2_frame_cache Tom Tromey
2012-08-02 16:33 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox