https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79337
Bug ID: 79337 Summary: [7 Regression] Significant memory leaks in IPA CP Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: hubicka at ucw dot cz, jamborm at gcc dot gnu.org Target Milestone: --- Starting from time when ipa_node_params_t lives in symbol_summary, I noticed memory leaks: $ valgrind --leak-check=yes --trace-children=yes ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/ipa/inline-2.c -O2 -c ==27671== 1,008 bytes in 2 blocks are definitely lost in loss record 605 of 678 ==27671== at 0x4C2D0C5: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==27671== by 0x1A7D250: xcalloc (xmalloc.c:162) ==27671== by 0x1926944: ipcp_propagate_stage(ipa_topo_info*) (ipa-cp.c:3248) ==27671== by 0x1929E4D: ipcp_driver (ipa-cp.c:4997) ==27671== by 0x1929E4D: (anonymous namespace)::pass_ipa_cp::execute(function*) (ipa-cp.c:5091) ==27671== by 0xD84DAF: execute_one_pass(opt_pass*) (passes.c:2465) ==27671== by 0xD85D1A: execute_ipa_pass_list(opt_pass*) (passes.c:2900) ==27671== by 0x99188C: ipa_passes (cgraphunit.c:2374) ==27671== by 0x99188C: symbol_table::compile() [clone .part.52] (cgraphunit.c:2460) ==27671== by 0x993FF4: compile (cgraphunit.c:2593) ==27671== by 0x993FF4: symbol_table::finalize_compilation_unit() (cgraphunit.c:2619) ==27671== by 0xEBD0C9: compile_file() (toplev.c:488) ==27671== by 0x77E736: do_compile (toplev.c:1983) ==27671== by 0x77E736: toplev::main(int, char**) (toplev.c:2117) ==27671== by 0x19EA880: main (main.c:39) There are multiple issues, I've got working patch that I've been testing.