[Bug analyzer/105087] fanalyzer double free false positive with vasprintf
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 28 19:14:27 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105087
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
#include "analyzer-decls.h"
extern void inner_alloc (void **);
void * __attribute__((noinline))
outer_alloc (void)
{
void *result;
inner_alloc (&result);
return result;
}
void test_1 (void)
{
void *p, *q;
p = outer_alloc ();
q = outer_alloc ();
__analyzer_eval (p == q); // bug: analyzer thinks this is true
}
More information about the Gcc-bugs
mailing list