[Bug gcov-profile/92382] variable double-definition in routine replace_filename_variables of libgcc/libgcov-driver-system.c

qinzhao at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 5 17:43:00 GMT 2019


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

--- Comment #2 from qinzhao at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #1)
> Why is this a major issue?  Just variable shadowing, so something that with
> -Wshadow* compiler will warn, but nothing more, the code is well defined,
> isn't it?

when you print the value of "buffer" inside gdb at line 161, it's NULL, not a
buffer with size 16. As a result, the sprint (buffer, "%d", get pic ()) at line
161 will write the processID to a NULL buffer, is this correct?


More information about the Gcc-bugs mailing list