public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/99026] New: memleak in switch-conversion
@ 2021-02-09 15:01 rguenth at gcc dot gnu.org
  2021-02-10  9:04 ` [Bug tree-optimization/99026] " marxin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-09 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99026
           Summary: memleak in switch-conversion
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

==12554== Memcheck, a memory error detector
==12554== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12554== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==12554== Command: ./cc1 -quiet -fdiagnostics-plain-output -O3 -o
ssa-dom-thread-1.s
/home/rguenther/src/gcc3/gcc/testsuite/gcc.dg/torture/pr45830.c
==12554== 
==12554== 
==12554== HEAP SUMMARY:
==12554==     in use at exit: 1,958,822 bytes in 2,888 blocks
==12554==   total heap usage: 49,711 allocs, 46,823 frees, 11,522,312 bytes
allocated
==12554== 
==12554== 752 (40 direct, 712 indirect) bytes in 1 blocks are definitely lost
in loss record 675 of 759
==12554==    at 0x4C2E94F: operator new(unsigned long) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12554==    by 0x1630BB2:
tree_switch_conversion::jump_table_cluster::find_jump_tables(vec<tree_switch_conversion::cluster*,
va_heap, vl_ptr>&) (tree-switch-conversion.c:1224)
==12554==    by 0x24FF349: if_chain::is_beneficial()
(gimple-if-to-switch.cc:241)
==12554==    by 0x250052F: (anonymous
namespace)::pass_if_to_switch::execute(function*) (gimple-if-to-switch.cc:545)
==12554==    by 0x12E7FEA: execute_one_pass(opt_pass*) (passes.c:2572)
==12554==    by 0x12E8321: execute_pass_list_1(opt_pass*) (passes.c:2661)
==12554==    by 0x12E8352: execute_pass_list_1(opt_pass*) (passes.c:2662)
==12554==    by 0x12E83AA: execute_pass_list(function*, opt_pass*)
(passes.c:2672)
==12554==    by 0x12E62DF: do_per_function_toporder(void (*)(function*, void*),
 void*) (passes.c:1774)
==12554==    by 0x12E8FDA: execute_ipa_pass_list(opt_pass*) (passes.c:3006)
==12554==    by 0xCFC9EE: ipa_passes() (cgraphunit.c:2157)
==12554==    by 0xCFCE24: symbol_table::compile() (cgraphunit.c:2292)
==12554== 
==12554==

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

* [Bug tree-optimization/99026] memleak in switch-conversion
  2021-02-09 15:01 [Bug tree-optimization/99026] New: memleak in switch-conversion rguenth at gcc dot gnu.org
@ 2021-02-10  9:04 ` marxin at gcc dot gnu.org
  2021-02-10 12:21 ` cvs-commit at gcc dot gnu.org
  2021-02-10 12:28 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-10  9:04 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-02-10
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/99026] memleak in switch-conversion
  2021-02-09 15:01 [Bug tree-optimization/99026] New: memleak in switch-conversion rguenth at gcc dot gnu.org
  2021-02-10  9:04 ` [Bug tree-optimization/99026] " marxin at gcc dot gnu.org
@ 2021-02-10 12:21 ` cvs-commit at gcc dot gnu.org
  2021-02-10 12:28 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-10 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:57d1b68d6582efec5a7ca63ea56a1cedbfe6e874

commit r11-7169-g57d1b68d6582efec5a7ca63ea56a1cedbfe6e874
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Feb 10 09:39:54 2021 +0100

    if-to-switch: fix memory leak in case merging

    gcc/ChangeLog:

            PR tree-optimization/99002
            PR tree-optimization/99026
            * gimple-if-to-switch.cc (if_chain::is_beneficial): Fix memory
            leak when adjacent cases are merged.
            * tree-switch-conversion.c
(switch_decision_tree::analyze_switch_statement): Use
            release_clusters.
            (make_pass_lower_switch): Remove trailing whitespace.
            * tree-switch-conversion.h (release_clusters): New.

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

* [Bug tree-optimization/99026] memleak in switch-conversion
  2021-02-09 15:01 [Bug tree-optimization/99026] New: memleak in switch-conversion rguenth at gcc dot gnu.org
  2021-02-10  9:04 ` [Bug tree-optimization/99026] " marxin at gcc dot gnu.org
  2021-02-10 12:21 ` cvs-commit at gcc dot gnu.org
@ 2021-02-10 12:28 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-10 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-02-10 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 15:01 [Bug tree-optimization/99026] New: memleak in switch-conversion rguenth at gcc dot gnu.org
2021-02-10  9:04 ` [Bug tree-optimization/99026] " marxin at gcc dot gnu.org
2021-02-10 12:21 ` cvs-commit at gcc dot gnu.org
2021-02-10 12:28 ` marxin 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).