bug-binutils
[Top][All Lists]
Advanced

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

Re: Fwd: Negation overflow in readelf.c


From: Nick Clifton
Subject: Re: Fwd: Negation overflow in readelf.c
Date: Wed, 12 Aug 2015 16:57:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi Dingbao,

If you build binutils-2.25 with ubsan (require gcc-4.9 or clang-3.3)
and execute command: readelf -a test_file (test files are in the
attachment).

You will see 3 runtime errors:
readelf.c:1543:39: runtime error: negation of -9223372036854775808 cannot
be represented in type 'bfd_signed_vma' (aka 'long'); cast to an unsigned
type to negate this value to itself
readelf.c:1555:36: runtime error: negation of -9223372036854775808 cannot
be represented in type 'bfd_signed_vma' (aka 'long'); cast to an unsigned
type to negate this value to itself
readelf.c:8374:39: runtime error: signed integer overflow: 8521 -
-9223372036854775112 cannot be represented in type 'long'

I believe that these are all fixed with the mainline sources. Please could you check and confirm this ?

Cheers
  Nick




reply via email to

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