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 Tue, May 20, 2014 at 01:04:13PM -0700, Douglas B Rupp wrote:
> Later around line 765 we have:
>           initial_insn_length = end - buf;
>           if (initial_insn_length <= sizeof (cie->initial_instructions))
>             {
>               cie->initial_insn_length = initial_insn_length;
>               ...
>             }

This has been fixed on mainline, which is why I couldn't see how you
were running into a problem..

commit 99d190fac4d2aab238cfc798dc5c28ab41456882
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Dec 20 23:57:52 2013 +1030

    Don't segv on cie.initial_instructions[] overflow.
    
> Shouldn't the "50" be at least "255"

The idea was to choose a value that is big enough for CIEs that might
be merged.  If CIEs with more than 50 bytes worth of insns are rare,
then 50 is still a good number.  A larger value than necessary just
wastes memory.

-- 
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]