[Bug middle-end/104069] -Werror=use-after-free false positive on elfutils-0.186
vincent at systemli dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 24 08:51:50 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069
vincent at systemli dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vincent at systemli dot org
--- Comment #24 from vincent at systemli dot org ---
elfutils 0.187 with gcc 12.2.0
In function 'bigger_buffer',
inlined from '__libdw_gunzip' at gzip.c:376:12:
gzip.c:98:9: error: pointer may be used after 'realloc'
[-Werror=use-after-free]
98 | b = realloc (state->buffer, more -= 1024);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gzip.c:96:13: note: call to 'realloc' here
96 | char *b = realloc (state->buffer, more);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
More information about the Gcc-bugs
mailing list