bug-gnulib
[Top][All Lists]
Advanced

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

Re: GCC optimizes integer overflow: bug or feature?


From: Paolo Bonzini
Subject: Re: GCC optimizes integer overflow: bug or feature?
Date: Tue, 19 Dec 2006 11:37:34 +0100
User-agent: Thunderbird 1.5.0.8 (Macintosh/20061025)


By the way, as I've tried to describe here:
<http://cert.uni-stuttgart.de/advisories/c-integer-overflow.php>
variable range tracking can result in reintroduction of
supposedly-fixed security vulnerabilities. 8-(

Interesting read. I agree with the proposed fix; however, note that GCC does not make the result of overflowing signed left-shifts undefined, exactly because in this case the overflow is relied upon by too many existing programs (and also because left shifts are inherently a bitwise operation, with well defined overflowing behavior on the most significant bits).

Paolo





reply via email to

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