[Bug c/61905] New: zero variable length array bound in cp-demangle.c cplus_demangle_print_callback

zeccav at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jul 25 08:13:00 GMT 2014


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

            Bug ID: 61905
           Summary: zero variable length array bound in cp-demangle.c
                    cplus_demangle_print_callback
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com

The sanitizer claims that compiling the testsuite files pr21255-2-mb.c and
pr21255-4.c and pr21255-3.c and pr21255-2-ml.c
a zero variable length array bound occurs
"../../gcc-4.9.1/libiberty/cp-demangle.c:4039:40: runtime error: 
variable length array bound evaluates to non-positive value 0"

Same at line 4040
"    __extension__ struct d_saved_scope scopes[dpi.num_saved_scopes];
    __extension__ struct d_print_template temps[dpi.num_copy_templates];"



More information about the Gcc-bugs mailing list