[Bug sanitizer/82072] sanitizer does not detect an overflow from LLONG_MIN
zeccav at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Sep 2 20:37:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82072
--- Comment #10 from Vittorio Zecca <zeccav at gmail dot com> ---
A related issue is the following:
/* UB sanitizer should detect undefined negation of LLONG_MIN */
/* must be compiled with -fsanitize=undefined and run */
#include <limits.h>
int main()
{
long long int llnum=LLONG_MIN;
unsigned int unum;
unum = - llnum;/*negation of -9223372036854775808 cannot be represented in type
'long long int'*/
return 0;
}
Or should I open a new bug?
More information about the Gcc-bugs
mailing list