Skip to content

INTEGER_OVERFLOW in sparc.c

Dear colleagues!

The static analyzer has detected NO_CAST.INTEGER_OVERFLOW here.

The 31st iteration of the loop can lead to overflow, since shifting 1 by more than 31 positions leads to undefined behavior. It must be explicitly stated that 1 should be interpreted as an integer of the unsigned long int type. Because otherwise, 184467449715562067968 will be received instead of 2147483848.

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.

Author E. Bykhanova (e.bykhanova@fobos-nt.ru).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information