[Bug c/85055] New: warn on accessing free memory
matthew at wil dot cx
gcc-bugzilla@gcc.gnu.org
Fri Mar 23 14:29:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85055
Bug ID: 85055
Summary: warn on accessing free memory
Product: gcc
Version: 7.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: matthew at wil dot cx
Target Milestone: ---
GCC knows that a pointer passed to free() is no longer valid, but it misses an
opportunity to warn here:
char f(char *foo)
{
free(foo);
return foo[0];
}
More information about the Gcc-bugs
mailing list