This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: [PATCH] Fix for reads of unallocated memory in ld


On Mon, May 12, 2014 at 08:18:34AM -0700, Douglas B Rupp wrote:
> diff -u -p -r1.92 elf-eh-frame.c
> --- elf-eh-frame.c	21 Feb 2013 02:29:08 -0000	1.92
> +++ elf-eh-frame.c	12 May 2014 15:01:57 -0000
> @@ -411,7 +411,7 @@ skip_non_nops (bfd_byte *buf, bfd_byte *
>    last = buf;
>    while (buf < end)
>      if (*buf == DW_CFA_nop)
> -      buf++;
> +      last = ++buf;
>      else
>        {
>  	if (*buf == DW_CFA_set_loc)

This can't be right.  The idea of skip_non_nops is to remove any
trailing nop padding from the CIE, so that two CIEs that are identical
except for padding, compare equal.

-- 
Alan Modra
Australia Development Lab, IBM


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