This is the mail archive of the
mailing list for the binutils project.
Re: [pr/17940] bfd/dwarf2.c: fix overflow bug in .dwarf_line
- From: Nicholas Clifton <nickc at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>, binutils at sourceware dot org
- Date: Mon, 23 Feb 2015 17:10:22 +0000
- Subject: Re: [pr/17940] bfd/dwarf2.c: fix overflow bug in .dwarf_line
- Authentication-results: sourceware.org; auth=none
- References: <201502120646 dot t1C6kigl020466 at greed dot delorie dot com>
If you have an unlinked object compiled with -ftext-sections,
RELOCATION RECORDS FOR [.debug_line]:
OFFSET TYPE VALUE
00000000 R_MSP430_ABS32 .debug_line_end-0x00000004
with .debug_line_end undefined (i.e. has a value of zero), which
results in -4 (0xfffffffc) being stored during "simple_reloc". This
is interpreted as a very large positive number. This patch checks for
that special case, and arbitrary overflow cases. OK?
Can you provide a testcase to go along with this patch please ?