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]

[commit] entryval: Do not gdb_assert on invalid CALL_SITE_PARAMETER_PARAM_OFFSET


Hi,

dwz (the DWARF optimizer by Jakub Jelinek) produces some IMO-invalid DWARF
described in:
	https://bugzilla.redhat.com/show_bug.cgi?id=840126

And GDB should not gdb_assert on external read-in DWARF anyway, so I have
turned it into just a 'complaint'.

No regressions on {x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu.

Checked in.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2012-07/msg00094.html

--- src/gdb/ChangeLog	2012/07/13 18:41:20	1.14460
+++ src/gdb/ChangeLog	2012/07/13 20:14:58	1.14461
@@ -1,3 +1,8 @@
+2012-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2read.c (read_call_site_scope): Do not gdb_assert for invalid
+	read-in CALL_SITE_PARAMETER_PARAM_OFFSET.
+
 2012-07-13  Doug Evans  <dje@google.com>
 
 	* symtab.c (output_source_filename): Delete unnecessary forward decl.
--- src/gdb/dwarf2read.c	2012/07/10 20:28:32	1.684
+++ src/gdb/dwarf2read.c	2012/07/13 20:15:03	1.685
@@ -8878,7 +8878,18 @@
 
 	  parameter->kind = CALL_SITE_PARAMETER_PARAM_OFFSET;
 	  offset = dwarf2_get_ref_die_offset (origin);
-	  gdb_assert (offset.sect_off >= cu->header.offset.sect_off);
+	  if (!offset_in_cu_p (&cu->header, offset))
+	    {
+	      /* As DW_OP_GNU_parameter_ref uses CU-relative offset this
+		 binding can be done only inside one CU.  Such referenced DIE
+		 therefore cannot be even moved to DW_TAG_partial_unit.  */
+	      complaint (&symfile_complaints,
+			 _("DW_AT_abstract_origin offset is not in CU for "
+			   "DW_TAG_GNU_call_site child DIE 0x%x "
+			   "[in module %s]"),
+			 child_die->offset.sect_off, objfile->name);
+	      continue;
+	    }
 	  parameter->u.param_offset.cu_off = (offset.sect_off
 	                                      - cu->header.offset.sect_off);
 	}


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