[PATCH] Fix for reads of unallocated memory in ld

Alan Modra amodra@gmail.com
Thu May 15 11:11:00 GMT 2014


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



More information about the Binutils mailing list