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 PR 11026


Keith pointed out today that attaching to abiword, with full debuginfo
installed, would crash gdb.  The bug was that we were allocating a name
on the comp_unit_obstack, meaning that the name was freed after it was
inserted into the mangled name hash.

I believe this is also PR 11026.

I will commit this once I get head building again, so I can regression
test it; the tester currently dies from the new warnings.

Tom

2010-01-19  Tom Tromey  <tromey@redhat.com>

	PR c++/11026:
	* dwarf2read.c (read_partial_die): Allocate partial DIE's name on
	objfile obstack.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.349
diff -u -r1.349 dwarf2read.c
--- dwarf2read.c	19 Jan 2010 18:11:18 -0000	1.349
+++ dwarf2read.c	19 Jan 2010 19:45:02 -0000
@@ -6781,7 +6781,7 @@
 	    default:
 	      part_die->name
 		= dwarf2_canonicalize_name (DW_STRING (&attr), cu,
-					    &cu->comp_unit_obstack);
+					    &cu->objfile->objfile_obstack);
 	      break;
 	    }
 	  break;


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