[Bug tree-optimization/117780] -fsanitize=undefined -O1 false positive ‘%s’ directive argument is null [-Wformat-truncation=]
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 26 07:13:22 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117780
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
if (c_5 == 0B)
goto <bb 3>; [0.00%]
else
goto <bb 5>; [100.00%]
<bb 3> [count: 0]:
__builtin___ubsan_handle_nonnull_arg (&*.Lubsan_data0);
_14 = strlen (0B);
snprintf (&aj, _14, &am, 0B);
It comes from jump threading where it is checking that the argument to strlen
was non-null.
More information about the Gcc-bugs
mailing list