[Bug c/106503] "const char []" in local scope never initialized

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 2 07:37:04 GMT 2022


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
const char junk[]

Goes out of scope and you still have a reference to it.

-fsanitize=address sometimes can detect this kind of problems at runtime.


More information about the Gcc-bugs mailing list