From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F70E385043F; Wed, 10 Feb 2021 12:31:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F70E385043F From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99057] New: Memory leak in cp_parser_selection_statement Date: Wed, 10 Feb 2021 12:31:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2021 12:31:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99057 Bug ID: 99057 Summary: Memory leak in cp_parser_selection_statement Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: jason at gcc dot gnu.org, mpolacek at gcc dot gnu.org Target Milestone: --- I see the following leak: g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/warn/anonymous-namespace-= 3.C -c -Wduplicated-cond -wrapper valgrind,--leak-check=3Dyes ... =3D=3D30789=3D=3D 240 bytes in 6 blocks are definitely lost in loss record = 1,620 of 1,879 =3D=3D30789=3D=3D at 0x483977F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) =3D=3D30789=3D=3D by 0x1DD4BEF: xrealloc (xmalloc.c:177) =3D=3D30789=3D=3D by 0xAD85B1: reserve (vec.h:290) =3D=3D30789=3D=3D by 0xAD85B1: reserve (vec.h:1778) =3D=3D30789=3D=3D by 0xAD85B1: safe_push (vec.h:1887) =3D=3D30789=3D=3D by 0xAD85B1: cp_parser_selection_statement (parser.c:1= 2341) =3D=3D30789=3D=3D by 0xAD85B1: cp_parser_statement(cp_parser*, tree_node= *, bool, bool*, vec*, unsigned int*) (parser.c:11623) =3D=3D30789=3D=3D by 0xAD8712: cp_parser_statement_seq_opt(cp_parser*, t= ree_node*) (parser.c:12112) =3D=3D30789=3D=3D by 0xAD87F0: cp_parser_compound_statement(cp_parser*, = tree_node*, int, bool) (parser.c:12062) =3D=3D30789=3D=3D by 0xAF60BF: cp_parser_function_body (parser.c:23991) =3D=3D30789=3D=3D by 0xAF60BF: cp_parser_ctor_initializer_opt_and_function_body(cp_parser*, bool) (parser.c:24042) =3D=3D30789=3D=3D by 0xAF7CCA: cp_parser_function_definition_after_declarator(cp_parser*, bool) (parser.c:29945) =3D=3D30789=3D=3D by 0xAF915D: cp_parser_function_definition_from_specifiers_and_declarator (parser.c:2986= 1) =3D=3D30789=3D=3D by 0xAF915D: cp_parser_init_declarator(cp_parser*, int, cp_decl_specifier_seq*, vec*, bool, bool, int, bool*, tree_node**, unsigned int*, tree_node**) (parser.c:21564) =3D=3D30789=3D=3D by 0xAFF477: cp_parser_single_declaration(cp_parser*, vec*, bool, bool, bool*) (parser.c:30441) =3D=3D30789=3D=3D by 0xAFF5F1: cp_parser_template_declaration_after_parameters(cp_parser*, tree_node*, boo= l) (parser.c:30013) =3D=3D30789=3D=3D by 0xAFFE0C: cp_parser_explicit_template_declaration(c= p_parser*, bool) (parser.c:30279) =3D=3D30789=3D=3D by 0xB02671: cp_parser_declaration(cp_parser*, tree_no= de*) (parser.c:14009)=