[Bug analyzer/99260] analyzer does not track outcomes of realloc

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 19 14:14:52 GMT 2021


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

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
In reply to David Malcolm from comment #0)
> The analyzer currently has no knowledge of the behavior of "realloc"
> (leading e.g. to bug 99193).
> 
> For example, it currently fails to issue a warning for the classic
> "self-assignment realloc" gotcha, code of the form:
>   p = realloc (p, 4096);

Bug 56370 tracks this (for the non-analyzer case)


More information about the Gcc-bugs mailing list