From: Mikael Morin <morin-mikael@orange.fr>
To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Tobias Burnus <burnus@net-b.de>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH,FORTRAN] Fix memory leak in finalization wrappers
Date: Sat, 6 Nov 2021 11:30:17 +0100 [thread overview]
Message-ID: <8490af7e-9e41-9599-b25b-ae8a86c1d3fc@orange.fr> (raw)
In-Reply-To: <6683b641-0c67-814e-cf87-e164729b1cfe@orange.fr>
Le 05/11/2021 à 19:46, Mikael Morin a écrit :
> Don’t you get the same effect on the memory leaks if you keep just the
> following hunk?
>
> >>> @@ -1605,8 +1608,7 @@ generate_finalization_wrapper (gfc_symbol
> *derived, gfc_namespace *ns,
> >>> /* Set up the namespace. */
> >>> sub_ns = gfc_get_namespace (ns, 0);
> >>> sub_ns->sibling = ns->contained;
> >>> - if (!expr_null_wrapper)
> >>> - ns->contained = sub_ns;
> >>> + ns->contained = sub_ns;
> >>> sub_ns->resolved = 1;
> >>>
> >>> /* Set up the procedure symbol. */
>
That’s probably not a good idea on second thought; it’s preferable to
leak memory and not generate an empty finalization procedure.
prev parent reply other threads:[~2021-11-06 10:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 18:29 [Patch, Fortran] No-op Patch - a.k.a. FINAL wrapper update Tobias Burnus
2012-11-29 22:59 ` Janus Weil
2012-11-30 1:53 ` Tobias Burnus
2012-11-30 10:30 ` Janus Weil
2012-11-30 10:39 ` Janus Weil
2012-11-30 12:29 ` Tobias Burnus
2012-12-02 22:54 ` Janus Weil
2018-10-15 9:02 ` [PATCH,FORTRAN] Fix memory leak in finalization wrappers Bernhard Reutner-Fischer
2021-10-27 21:39 ` Bernhard Reutner-Fischer
2021-10-28 23:58 ` Bernhard Reutner-Fischer
2021-11-05 18:46 ` Mikael Morin
2021-11-05 22:08 ` Bernhard Reutner-Fischer
2021-11-06 12:04 ` Mikael Morin
2021-11-06 23:56 ` Bernhard Reutner-Fischer
2021-11-07 12:32 ` Mikael Morin
2021-11-14 19:53 ` Bernhard Reutner-Fischer
2021-11-06 10:30 ` Mikael Morin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8490af7e-9e41-9599-b25b-ae8a86c1d3fc@orange.fr \
--to=morin-mikael@orange.fr \
--cc=burnus@net-b.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=rep.dot.nop@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).