[Bug other/63426] [meta-bug] Issues found with -fsanitize=undefined

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 1 11:13:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Here's the full list (cut down to one instance per issue) of todays trunk:

gcc/fortran/interface.c:2667:43: runtime error: load of value 1818451807, which
is not a valid value for type 'expr_t'
gcc/fortran/interface.c:2908:47: runtime error: load of value 108398592, which
is not a valid value for type 'ar_type'
gcc/fortran/trans-array.c:2211:9: runtime error: load of value 92, which is not
a valid value for type 'bool'
gcc/fortran/trans-expr.c:2286:48: runtime error: negation of
-9223372036854775808 cannot be represented in type 'long int'; cast to an
unsigned type to negate this value to itself
gcc/hwint.h:250:29: runtime error: shift exponent 64 is too large for 64-bit
type 'long int'
gcc/ira.c:2465:24: runtime error: signed integer overflow: -2097715000 +
-65536000 cannot be represented in type 'int'
gcc/ira.c:2472:31: runtime error: signed integer overflow: -2097600000 +
-65536000 cannot be represented in type 'int'
gcc/loop-iv.c:2305:24: runtime error: signed integer overflow:
9223372036854775807 - -9223372036854775808 cannot be represented in type 'long
int'
gcc/loop-iv.c:2643:14: runtime error: signed integer overflow:
9223372036854775806 - -9223372036854775808 cannot be represented in type 'long
int'
gcc/tree-data-ref.c:2352:38: runtime error: signed integer overflow: 1073741824
+ 1073741824 cannot be represented in type 'int'
gcc/tree-data-ref.c:2443:16: runtime error: negation of -2147483648 cannot be
represented in type 'int'; cast to an unsigned type to negate this value to
itself
gcc/tree-ssa-loop-ivopts.c:4192:24: runtime error: signed integer overflow: 4 *
4611686018427387903 cannot be represented in type 'long int'
libiberty/cp-demangle.c:4074:40: runtime error: variable length array bound
evaluates to non-positive value 0
libiberty/cp-demangle.c:4075:43: runtime error: variable length array bound
evaluates to non-positive value 0

There are also a couple of buggy testcases:

testsuite/gcc.dg/compat/generate-random_r.c:363:19: runtime error: signed
integer overflow: 1627687941 + 1735697613 cannot be represented in type 'int'
testsuite/gcc.dg/compat/struct-layout-1_generate.c:1081:13: runtime error:
shift exponent 64 is too large for 64-bit type 'long long unsigned int'
testsuite/g++.dg/compat/../../gcc.dg/compat/generate-random_r.c:363:19: runtime
error: signed integer overflow: 1627687941 + 1735697613 cannot be represented
in type 'int'
testsuite/g++.dg/compat/struct-layout-1_generate.c:795:26: runtime error: shift
exponent 64 is too large for 64-bit type 'long long unsigned int'
testsuite/g++.dg/compat/struct-layout-1_generate.c:805:13: runtime error: shift
exponent 65 is too large for 64-bit type 'long long unsigned int



More information about the Gcc-bugs mailing list