[Bug c/118233] -Werror=stringop-overflow __builtin___memcpy_chk
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 29 18:28:39 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118233
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>18446744073709551608 and 18446744073709551613
-8 and -3 .
Some how GCC decided the range of new_path.len is [-8, -3].
new_path.type = 2;
new_path.len = pathlen - bMatch - 2;
memcpy(new_path.value, &(path[bMatch + 2]), new_path.len);
I have not exactly looked into why though.
It would mean that `pathlen < bMatch`
More information about the Gcc-bugs
mailing list