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] S/390: Fix invalid left shift of negative integer value.


On Fri, Oct 30, 2015 at 01:45:11PM +0100, Andreas Schwab wrote:
> Dominik Vogt <vogt@linux.vnet.ibm.com> writes:
> > -  return ((addr + (1 << align) - 1) & (-1 << align));
> > +  return ((addr + (1 << align) - 1) & (~0u << align));
> 
> This is not the same if valueT is wider than int.

You're right.  I'll fix that and send a new patch in a different
thread with fixes for all such shifts in binutils_gdb.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany


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