public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99055] New: memory leak in warn_parm_array_mismatch
@ 2021-02-10 9:43 rguenth at gcc dot gnu.org
2021-02-10 16:01 ` [Bug c/99055] " msebor at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-10 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99055
Bug ID: 99055
Summary: memory leak in warn_parm_array_mismatch
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
==23200== Memcheck, a memory error detector
==23200== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23200== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==23200== Command: ./cc1 -quiet -fdiagnostics-plain-output -O3 -o
ssa-dom-thread-2.s
/home/rguenther/src/gcc3/gcc/testsuite/gcc.c-torture/compile/pr77754-5.c
==23200==
==23200==
==23200== HEAP SUMMARY:
==23200== in use at exit: 1,860,863 bytes in 2,692 blocks
==23200== total heap usage: 26,486 allocs, 23,794 frees, 6,321,282 bytes
allocated
==23200==
==23200== 7 bytes in 1 blocks are definitely lost in loss record 1 of 675
==23200== at 0x4C2E2DF: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23200== by 0x28ECBF6: xmalloc (xmalloc.c:147)
==23200== by 0x28ECD6F: xstrdup (xstrdup.c:34)
==23200== by 0x15EF359: print_generic_expr_to_str(tree_node*)
(tree-pretty-print.c:179)
==23200== by 0xBD992D: warn_parm_array_mismatch(unsigned int, tree_node*,
tree_node*) (c-warn.c:3589)
==23200== by 0xA4089D: start_function(c_declspecs*, c_declarator*,
tree_node*) (c-decl.c:9601)
==23200== by 0xAAD6A4: c_parser_declaration_or_fndef(c_parser*, bool, bool,
bool, bool, bool, tree_node**, vec<c_token, va_heap, vl_ptr>, bool, tree_node*,
oacc_routine_data*, bool*) (c-parser.c:2440)
==23200== by 0xAABE71: c_parser_external_declaration(c_parser*)
(c-parser.c:1777)
==23200== by 0xAAB98D: c_parser_translation_unit(c_parser*)
(c-parser.c:1650)
==23200== by 0xAEBF10: c_parse_file() (c-parser.c:21990)
==23200== by 0xB89212: c_common_parse_file() (c-opts.c:1218)
==23200== by 0x148FCD3: compile_file() (toplev.c:457)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/99055] memory leak in warn_parm_array_mismatch
2021-02-10 9:43 [Bug c/99055] New: memory leak in warn_parm_array_mismatch rguenth at gcc dot gnu.org
@ 2021-02-10 16:01 ` msebor at gcc dot gnu.org
2021-02-10 17:20 ` msebor at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-02-10 16:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99055
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2021-02-10
CC| |msebor at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/99055] memory leak in warn_parm_array_mismatch
2021-02-10 9:43 [Bug c/99055] New: memory leak in warn_parm_array_mismatch rguenth at gcc dot gnu.org
2021-02-10 16:01 ` [Bug c/99055] " msebor at gcc dot gnu.org
@ 2021-02-10 17:20 ` msebor at gcc dot gnu.org
2021-02-11 18:33 ` msebor at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-02-10 17:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99055
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-February/565139.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/99055] memory leak in warn_parm_array_mismatch
2021-02-10 9:43 [Bug c/99055] New: memory leak in warn_parm_array_mismatch rguenth at gcc dot gnu.org
2021-02-10 16:01 ` [Bug c/99055] " msebor at gcc dot gnu.org
2021-02-10 17:20 ` msebor at gcc dot gnu.org
@ 2021-02-11 18:33 ` msebor at gcc dot gnu.org
2021-02-12 18:19 ` cvs-commit at gcc dot gnu.org
2021-02-12 18:20 ` msebor at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-02-11 18:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99055
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Created attachment 50170
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50170&action=edit
Valgrind leak output with patch from comment #1 applied.
Attached is Valgrind leak output with the patch from comment #1 applied. The
file is too big to post to gcc-patches.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/99055] memory leak in warn_parm_array_mismatch
2021-02-10 9:43 [Bug c/99055] New: memory leak in warn_parm_array_mismatch rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2021-02-11 18:33 ` msebor at gcc dot gnu.org
@ 2021-02-12 18:19 ` cvs-commit at gcc dot gnu.org
2021-02-12 18:20 ` msebor at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-12 18:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99055
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:f3d7fd1475eb1ed2b3a39f988b33db176d4f7419
commit r11-7226-gf3d7fd1475eb1ed2b3a39f988b33db176d4f7419
Author: Martin Sebor <msebor@redhat.com>
Date: Fri Feb 12 11:18:17 2021 -0700
PR c/99055 - memory leak in warn_parm_array_mismatch
gcc/c-family/ChangeLog:
PR c/99055
* c-warn.c (warn_parm_array_mismatch): Free strings returned from
print_generic_expr_to_str.
gcc/ChangeLog:
* tree-pretty-print.c (print_generic_expr_to_str): Update comment.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/99055] memory leak in warn_parm_array_mismatch
2021-02-10 9:43 [Bug c/99055] New: memory leak in warn_parm_array_mismatch rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2021-02-12 18:19 ` cvs-commit at gcc dot gnu.org
@ 2021-02-12 18:20 ` msebor at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-02-12 18:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99055
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Target Milestone|--- |11.0
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed in r11-7226.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-02-12 18:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 9:43 [Bug c/99055] New: memory leak in warn_parm_array_mismatch rguenth at gcc dot gnu.org
2021-02-10 16:01 ` [Bug c/99055] " msebor at gcc dot gnu.org
2021-02-10 17:20 ` msebor at gcc dot gnu.org
2021-02-11 18:33 ` msebor at gcc dot gnu.org
2021-02-12 18:19 ` cvs-commit at gcc dot gnu.org
2021-02-12 18:20 ` msebor 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).