[Bug sanitizer/115899] [14 Regression] Misaligned address check missing
bic60176 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 12 19:22:10 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115899
--- Comment #2 from Bi6c <bic60176 at gmail dot com> ---
OS: Ubuntu 22.04.3 LTS
We found that GCC failed to detect a signed integer overflow error in
gcc-14.1.0 at optimization level 0.
$ ~/compiler-builds/gcc-13.2.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s -w
-O0 testcase.c -o exec
$ timeout 2s ./exec 2>exec.err
-2
$ cat exec.err
testcase.c:20:64: runtime error: signed integer overflow: 61952 * 61952 cannot
be represented in type 'int'
$ ~/compiler-builds/gcc-14.1.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s -w
-O0 testcase.c -o exec
$ timeout 2s ./exec 2>exec.err
-2
$ cat exec.err
$
More information about the Gcc-bugs
mailing list