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

            Bug ID: 101984
           Summary: [12 Regression] gimple-ssa-warn-access memory leak
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: GC
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at gcc dot gnu.org
  Target Milestone: ---

As part of the warning code refactoring, alloc_max_size() was moved from
calls.c to gimple-ssa-warn-access.cc.  The alloc_object_size_limit variable was
removed and the Tree generated by build_int_cst call in the function is not
managed by the GC machinery, leaking memory.

A patch was posted, but gimple-ssa-warn-access.cc is the first file with file
extension ".cc" to use the GC machinery, so the GCC Makefile machinery is not
prepared to automatically generate the GTY header.  (gimple-isel.cc is listed
but does not use GTY.)

https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577723.html

Reply via email to