public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/101984] New: [12 Regression] gimple-ssa-warn-access memory leak
@ 2021-08-19 16:20 dje at gcc dot gnu.org
2021-08-19 16:21 ` [Bug other/101984] " dje at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: dje at gcc dot gnu.org @ 2021-08-19 16:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101984
Bug ID: 101984
Summary: [12 Regression] gimple-ssa-warn-access memory leak
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: GC
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: dje at gcc dot gnu.org
Target Milestone: ---
As part of the warning code refactoring, alloc_max_size() was moved from
calls.c to gimple-ssa-warn-access.cc. The alloc_object_size_limit variable was
removed and the Tree generated by build_int_cst call in the function is not
managed by the GC machinery, leaking memory.
A patch was posted, but gimple-ssa-warn-access.cc is the first file with file
extension ".cc" to use the GC machinery, so the GCC Makefile machinery is not
prepared to automatically generate the GTY header. (gimple-isel.cc is listed
but does not use GTY.)
https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577723.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/101984] [12 Regression] gimple-ssa-warn-access memory leak
2021-08-19 16:20 [Bug other/101984] New: [12 Regression] gimple-ssa-warn-access memory leak dje at gcc dot gnu.org
@ 2021-08-19 16:21 ` dje at gcc dot gnu.org
2021-08-19 17:55 ` msebor at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dje at gcc dot gnu.org @ 2021-08-19 16:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101984
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-08-19
CC| |msebor at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |NEW
--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/101984] [12 Regression] gimple-ssa-warn-access memory leak
2021-08-19 16:20 [Bug other/101984] New: [12 Regression] gimple-ssa-warn-access memory leak dje at gcc dot gnu.org
2021-08-19 16:21 ` [Bug other/101984] " dje at gcc dot gnu.org
@ 2021-08-19 17:55 ` msebor at gcc dot gnu.org
2021-08-19 18:43 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-08-19 17:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101984
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
Status|NEW |ASSIGNED
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch I'm testing:
diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc
index f3efe564af0..4a2dd9ade77 100644
--- a/gcc/gimple-ssa-warn-access.cc
+++ b/gcc/gimple-ssa-warn-access.cc
@@ -3310,12 +3310,16 @@ pass_waccess::check (basic_block bb)
unsigned
pass_waccess::execute (function *fun)
{
+ /* Create a new ranger instance and associate it with FUN. */
m_ranger = enable_ranger (fun);
basic_block bb;
FOR_EACH_BB_FN (bb, fun)
check (bb);
+ /* Release the ranger instance and replace it with a global ranger. */
+ disable_ranger (fun);
+
return 0;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/101984] [12 Regression] gimple-ssa-warn-access memory leak
2021-08-19 16:20 [Bug other/101984] New: [12 Regression] gimple-ssa-warn-access memory leak dje at gcc dot gnu.org
2021-08-19 16:21 ` [Bug other/101984] " dje at gcc dot gnu.org
2021-08-19 17:55 ` msebor at gcc dot gnu.org
@ 2021-08-19 18:43 ` cvs-commit at gcc dot gnu.org
2021-08-19 18:45 ` msebor at gcc dot gnu.org
2021-08-20 7:52 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-19 18:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101984
--- 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:81501087758cb0c32e555858cf367e449a09246e
commit r12-3031-g81501087758cb0c32e555858cf367e449a09246e
Author: Martin Sebor <msebor@redhat.com>
Date: Thu Aug 19 12:42:28 2021 -0600
Release resources acquired by enable_ranger() [PR101984].
Resolves:
PR middle-end/101984 - gimple-ssa-warn-access memory leak
gcc/ChangeLog:
PR middle-end/101984
* gimple-ssa-warn-access.cc (pass_waccess::execute): Also call
disable_ranger.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/101984] [12 Regression] gimple-ssa-warn-access memory leak
2021-08-19 16:20 [Bug other/101984] New: [12 Regression] gimple-ssa-warn-access memory leak dje at gcc dot gnu.org
` (2 preceding siblings ...)
2021-08-19 18:43 ` cvs-commit at gcc dot gnu.org
@ 2021-08-19 18:45 ` msebor at gcc dot gnu.org
2021-08-20 7:52 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-08-19 18:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101984
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
The leak should be plugged now.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/101984] [12 Regression] gimple-ssa-warn-access memory leak
2021-08-19 16:20 [Bug other/101984] New: [12 Regression] gimple-ssa-warn-access memory leak dje at gcc dot gnu.org
` (3 preceding siblings ...)
2021-08-19 18:45 ` msebor at gcc dot gnu.org
@ 2021-08-20 7:52 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-20 7:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101984
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-20 7:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 16:20 [Bug other/101984] New: [12 Regression] gimple-ssa-warn-access memory leak dje at gcc dot gnu.org
2021-08-19 16:21 ` [Bug other/101984] " dje at gcc dot gnu.org
2021-08-19 17:55 ` msebor at gcc dot gnu.org
2021-08-19 18:43 ` cvs-commit at gcc dot gnu.org
2021-08-19 18:45 ` msebor at gcc dot gnu.org
2021-08-20 7:52 ` 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).