This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR binutils/13196: readelf floating point exception
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Sun, 18 Sep 2011 09:51:55 -0700
- Subject: PATCH: PR binutils/13196: readelf floating point exception
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
We should check zero address size in display_debug_aranges. I
checked in this as an obvious fix.
H.J.
---
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 144dbff..8af899b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/13196
+ * dwarf.c (display_debug_aranges): Check zero address size.
+
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/13180
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 776f775..1ee0e33 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -4215,6 +4215,13 @@ display_debug_aranges (struct dwarf_section *section,
address_size = arange.ar_pointer_size + arange.ar_segment_size;
+ if (address_size == 0)
+ {
+ error (_("Invalid address size in %s section!\n"),
+ section->name);
+ break;
+ }
+
/* The DWARF spec does not require that the address size be a power
of two, but we do. This will have to change if we ever encounter
an uneven architecture. */