From: Harald Anlauf <anlauf@gmx.de>
To: Mikael Morin <morin-mikael@orange.fr>,
gfortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: fortran: Reuse associated_dummy memory if previously allocated [PR108923]
Date: Sat, 25 Feb 2023 18:20:41 +0100 [thread overview]
Message-ID: <3a6bd277-f8e7-aca7-9077-7f86834b7b5f@gmx.de> (raw)
In-Reply-To: <48878e99-0ecb-3688-0c2e-db7ec69856df@orange.fr>
Hi Mikael,
Am 25.02.23 um 17:35 schrieb Mikael Morin:
> Hello,
>
> Harald found a testcase with memory still leaking despite my previous
> patch for PR108923.
> That patch was fixing a leak caused by absence of memory release, the
> attached patch fixes a leak caused by pointer overwrite.
>
> I haven't investigated why sort_actual is called several times( which
> causes the memory leak) nor tried to avoid that. Theoretically, one
> could assert that the previous associated_dummy value is the same as the
> one to be written (it should be the same at each sort_actual
> invocation), but I have preferred to silently overwrite, and fix just
> the memory problem.
>
> Manually tested on Harald's testcase (predcom-1.f) and ran the full
> fortran testsuite on x86_64-pc-linux-gnu.
>
> OK for master and 12 and 11?
LGTM. OK for master and 12-branch.
It appears that 11-branch is significantly different in the respective
places. get_intrinsic_dummy_arg does not exist there, so this patch
seems to not apply there. Or am I missing something?
Thanks for the patch!
Harald
next prev parent reply other threads:[~2023-02-25 17:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-25 16:35 Mikael Morin
2023-02-25 17:20 ` Harald Anlauf [this message]
2023-02-25 18:08 ` Mikael Morin
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=3a6bd277-f8e7-aca7-9077-7f86834b7b5f@gmx.de \
--to=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=morin-mikael@orange.fr \
/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).