public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3031] Release resources acquired by enable_ranger() [PR101984].
@ 2021-08-19 18:43 Martin Sebor
0 siblings, 0 replies; only message in thread
From: Martin Sebor @ 2021-08-19 18:43 UTC (permalink / raw)
To: gcc-cvs
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.
Diff:
---
gcc/gimple-ssa-warn-access.cc | 4 ++++
1 file changed, 4 insertions(+)
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] only message in thread
only message in thread, other threads:[~2021-08-19 18:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 18:43 [gcc r12-3031] Release resources acquired by enable_ranger() [PR101984] Martin Sebor
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).