This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: fix cleanup buglet in dwarf2read.c
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 23 Nov 2009 15:04:57 -0700
- Subject: FYI: fix cleanup buglet in dwarf2read.c
- Reply-to: tromey at redhat dot com
I'm checking this in.
I ran across this cleanup buglet while doing other work on dwarf2read.c.
The bug is that we overwrite 'back_to', leaking a null cleanup object.
Built and regtested on x86-64 (compile farm).
Tom
2009-11-23 Tom Tromey <tromey@redhat.com>
* dwarf2read.c (find_partial_die): Don't reassign to 'back_to'.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.338
diff -u -r1.338 dwarf2read.c
--- dwarf2read.c 16 Nov 2009 18:40:21 -0000 1.338
+++ dwarf2read.c 23 Nov 2009 22:03:56 -0000
@@ -6914,7 +6914,7 @@
if (per_cu->cu->dwarf2_abbrevs == NULL)
{
dwarf2_read_abbrevs (per_cu->cu->objfile->obfd, per_cu->cu);
- back_to = make_cleanup (dwarf2_free_abbrev_table, per_cu->cu);
+ make_cleanup (dwarf2_free_abbrev_table, per_cu->cu);
}
info_ptr = (dwarf2_per_objfile->info.buffer
+ per_cu->cu->header.offset