public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/97346] New: IPA reference reference_vars_to_consider leaks
@ 2020-10-09  8:00 rguenth at gcc dot gnu.org
  2020-10-09  8:03 ` [Bug ipa/97346] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-09  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97346
           Summary: IPA reference reference_vars_to_consider leaks
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

==20551== 96 (8 direct, 88 indirect) bytes in 1 blocks are definitely lost in
loss record 535 of 730
==20551==    at 0x4C2E94F: operator new(unsigned long) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20551==    by 0x14A6E6B: void vec_alloc<tree_node*>(vec<tree_node*, va_heap,
vl_ptr>*&, unsigned int) (vec.h:1567)
==20551==    by 0x24BB41F: ipa_init() (ipa-reference.c:461)
==20551==    by 0x24BB896: generate_summary() (ipa-reference.c:597)
==20551==    by 0x24BC18A: propagate() (ipa-reference.c:768)
==20551==    by 0x24BD88C: (anonymous
namespace)::pass_ipa_reference::execute(function*) (ipa-reference.c:1299)
==20551==    by 0x121A924: execute_one_pass(opt_pass*) (passes.c:2509)
==20551==    by 0x121B893: execute_ipa_pass_list(opt_pass*) (passes.c:2936)
==20551==    by 0xC6ED1D: ipa_passes() (cgraphunit.c:2700)

the use of this global is quite odd, with two allocations, one release
site using just 'delete' and one conditional freeing the vector but
unconditionally NULLing the pointer to it.

I wonder if the array should be made local to a few functions to make
lifetime more obvious.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-02-15  7:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09  8:00 [Bug ipa/97346] New: IPA reference reference_vars_to_consider leaks rguenth at gcc dot gnu.org
2020-10-09  8:03 ` [Bug ipa/97346] " rguenth at gcc dot gnu.org
2021-02-08 13:11 ` rguenth at gcc dot gnu.org
2021-02-08 15:02 ` hubicka at gcc dot gnu.org
2021-02-10 10:54 ` rguenth at gcc dot gnu.org
2021-02-10 10:54 ` rguenth at gcc dot gnu.org
2021-02-10 11:04 ` rguenth at gcc dot gnu.org
2021-02-10 12:47 ` hubicka at ucw dot cz
2021-02-10 12:56 ` rguenth at gcc dot gnu.org
2021-02-14 22:26 ` cvs-commit at gcc dot gnu.org
2021-02-15  7:46 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).