RFC: missing do_cleanups call in dwarf2_frame_cache
Tom Tromey
tromey@redhat.com
Thu Aug 2 16:08:00 GMT 2012
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
More information about the Gdb-patches
mailing list