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

            Bug ID: 128965
           Summary: Provide an option for -Wanalyzer-malloc-leak to report
                    on memory leaks due to exiting "main"
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
            Blocks: 128964
  Target Milestone: ---

By default -Wanalyzer-malloc-leak doesn't bother reporting on leaks that happen
when exiting "main".

I'm not sure anyone should care, however sometimes this confuses users.

Also, if we're playing benchmark games, CASTLE-401-4.c through -6.c are
penalized as false negatives, where the leak is in "main" and the benchmark
expects a complaint.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128964
[Bug 128964] GCC -fanalyzer improvements related to CASTLE benchmark

Reply via email to