bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix undefined shift overflow


From: Nick Clifton
Subject: Re: Fix undefined shift overflow
Date: Wed, 3 Feb 2016 15:48:51 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

Hi Michael,

This idiom also appears in newlib and in various versions of GDB and
associated codebases. I'm not sure how this maps to actual development
repos.

Well GDB shares a repo with the binutils, but newlib has its own repo.

All forms I found are one of the following source text snippets:

(m = 1; m != 0; m <<= 1)

(i = 1; i; i <<= 1)

If you grep for that, you may find more. Of course, it's only a bug if
the variable is signed.


I checked, but could not find any other places in the binutils sources where 
this kind of expression appears.  (With a signed variable that is).

I found one place in the GDB sources where bug appears to be real: 
sim/common/cgen-scache,c: scache_option_handler().  So I will submit a bug 
report about that.

I am not a newlib expert, so I have left those sources alone.

Cheers
  Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]