This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: fix cleanup buglet in dwarf2read.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]