public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/37336] [F03] Finish derived-type finalization Date: Tue, 09 Nov 2021 20:57:13 +0000 [thread overview] Message-ID: <bug-37336-4-xResIMLijZ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-37336-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336 --- Comment #31 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Bernhard Reutner-Fischer <aldot@gcc.gnu.org>: https://gcc.gnu.org/g:8875a92d31329ae52b734683784c4b054839a661 commit r12-5073-g8875a92d31329ae52b734683784c4b054839a661 Author: Bernhard Reutner-Fischer <aldot@gcc.gnu.org> Date: Fri Oct 12 23:57:21 2018 +0200 Fortran: Fix memory leak in finalization wrappers [PR68800] If a finalization is not required we created a namespace containing formal arguments for an internal interface definition but never used any of these. So the whole sub_ns namespace was not wired up to the program and consequently was never freed. The fix is to simply not generate any finalization wrappers if we know that it will be unused. Note that this reverts back to the original r190869 (8a96d64282ac534cb597f446f02ac5d0b13249cc) handling for this case by reverting this specific part of r194075 (f1ee56b4be7cc3892e6ccc75d73033c129098e87) for PR fortran/37336. valgrind summary for e.g. gfortran.dg/abstract_type_3.f03 and gfortran.dg/abstract_type_4.f03 where ".orig" is pristine trunk and ".mine" contains this fix: at3.orig.vg:LEAK SUMMARY: at3.orig.vg- definitely lost: 8,460 bytes in 11 blocks at3.orig.vg- indirectly lost: 13,288 bytes in 55 blocks at3.orig.vg- possibly lost: 0 bytes in 0 blocks at3.orig.vg- still reachable: 572,278 bytes in 2,142 blocks at3.orig.vg- suppressed: 0 bytes in 0 blocks at3.orig.vg- at3.orig.vg-Use --track-origins=yes to see where uninitialised values come from at3.orig.vg-ERROR SUMMARY: 38 errors from 33 contexts (suppressed: 0 from 0) -- at3.mine.vg:LEAK SUMMARY: at3.mine.vg- definitely lost: 344 bytes in 1 blocks at3.mine.vg- indirectly lost: 7,192 bytes in 18 blocks at3.mine.vg- possibly lost: 0 bytes in 0 blocks at3.mine.vg- still reachable: 572,278 bytes in 2,142 blocks at3.mine.vg- suppressed: 0 bytes in 0 blocks at3.mine.vg- at3.mine.vg-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) at3.mine.vg-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) at4.orig.vg:LEAK SUMMARY: at4.orig.vg- definitely lost: 13,751 bytes in 12 blocks at4.orig.vg- indirectly lost: 11,976 bytes in 60 blocks at4.orig.vg- possibly lost: 0 bytes in 0 blocks at4.orig.vg- still reachable: 572,278 bytes in 2,142 blocks at4.orig.vg- suppressed: 0 bytes in 0 blocks at4.orig.vg- at4.orig.vg-Use --track-origins=yes to see where uninitialised values come from at4.orig.vg-ERROR SUMMARY: 18 errors from 16 contexts (suppressed: 0 from 0) -- at4.mine.vg:LEAK SUMMARY: at4.mine.vg- definitely lost: 3,008 bytes in 3 blocks at4.mine.vg- indirectly lost: 4,056 bytes in 11 blocks at4.mine.vg- possibly lost: 0 bytes in 0 blocks at4.mine.vg- still reachable: 572,278 bytes in 2,142 blocks at4.mine.vg- suppressed: 0 bytes in 0 blocks at4.mine.vg- at4.mine.vg-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) at4.mine.vg-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0) gcc/fortran/ChangeLog: 2018-10-12 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> PR fortran/68800 * class.c (generate_finalization_wrapper): Do not leak finalization wrappers if they will not be used. * expr.c (gfc_free_actual_arglist): Formatting fix. * gfortran.h (gfc_free_symbol): Pass argument by reference. (gfc_release_symbol): Likewise. (gfc_free_namespace): Likewise. * symbol.c (gfc_release_symbol): Adjust acordingly. (free_components): Set procedure pointer components of derived types to NULL after freeing. (free_tb_tree): Likewise. (gfc_free_symbol): Set sym to NULL after freeing. (gfc_free_namespace): Set namespace to NULL after freeing.
next prev parent reply other threads:[~2021-11-09 20:57 UTC|newest] Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-37336-4@http.gcc.gnu.org/bugzilla/> 2010-10-26 7:46 ` [Bug fortran/37336] Fortran 2003: " burnus at gcc dot gnu.org 2010-12-02 4:35 ` damian at rouson dot net 2010-12-27 2:04 ` dfranke at gcc dot gnu.org 2012-03-15 17:41 ` w6ws at earthlink dot net 2012-03-18 15:53 ` tkoenig at gcc dot gnu.org 2012-05-07 10:20 ` burnus at gcc dot gnu.org 2012-09-03 6:37 ` burnus at gcc dot gnu.org 2012-09-22 17:08 ` burnus at gcc dot gnu.org 2012-10-26 16:47 ` janus at gcc dot gnu.org 2012-11-27 20:04 ` burnus at gcc dot gnu.org 2012-12-03 8:55 ` burnus at gcc dot gnu.org 2012-12-03 9:01 ` janus at gcc dot gnu.org 2012-12-03 21:14 ` burnus at gcc dot gnu.org 2012-12-05 8:54 ` janus at gcc dot gnu.org 2013-05-28 18:31 ` burnus at gcc dot gnu.org 2013-05-28 18:33 ` burnus at gcc dot gnu.org 2013-05-29 13:23 ` burnus at gcc dot gnu.org 2013-05-29 13:26 ` burnus at gcc dot gnu.org 2013-06-04 10:21 ` burnus at gcc dot gnu.org 2013-06-04 10:27 ` burnus at gcc dot gnu.org 2013-06-08 12:28 ` burnus at gcc dot gnu.org 2013-06-21 21:53 ` burnus at gcc dot gnu.org 2013-07-22 11:01 ` janus at gcc dot gnu.org 2013-07-31 20:43 ` janus at gcc dot gnu.org 2014-01-12 11:12 ` [Bug fortran/37336] [F03] " janus at gcc dot gnu.org 2014-02-08 21:36 ` janus at gcc dot gnu.org 2014-03-15 12:14 ` janus at gcc dot gnu.org 2014-03-18 22:23 ` janus at gcc dot gnu.org 2014-12-15 11:50 ` janus at gcc dot gnu.org 2015-02-15 16:03 ` dominiq at lps dot ens.fr 2015-02-15 16:58 ` sourcery at rouson dot net 2015-09-03 16:08 ` dominiq at lps dot ens.fr 2015-09-03 20:35 ` fxcoudert at gcc dot gnu.org 2015-09-07 9:54 ` ian_harvey at bigpond dot com 2015-09-25 20:35 ` mikael at gcc dot gnu.org 2020-06-01 18:52 ` tkoenig at gcc dot gnu.org 2020-06-14 21:27 ` tkoenig at gcc dot gnu.org 2020-07-13 20:00 ` dominiq at lps dot ens.fr 2021-11-09 20:57 ` cvs-commit at gcc dot gnu.org [this message] 2022-02-01 14:31 ` pault at gcc dot gnu.org 2022-02-03 13:13 ` pault at gcc dot gnu.org 2023-03-18 7:56 ` cvs-commit at gcc dot gnu.org 2023-03-18 12:21 ` pault at gcc dot gnu.org 2023-03-18 12:23 ` pault at gcc dot gnu.org 2023-03-18 15:22 ` pault at gcc dot gnu.org 2023-03-18 15:25 ` pault at gcc dot gnu.org 2023-03-18 15:46 ` pault at gcc dot gnu.org 2023-03-18 15:49 ` pault at gcc dot gnu.org 2023-03-18 15:53 ` pault at gcc dot gnu.org 2023-03-18 16:00 ` pault at gcc dot gnu.org 2023-03-18 16:19 ` pault at gcc dot gnu.org 2023-03-18 17:25 ` pault at gcc dot gnu.org 2023-03-18 17:28 ` pault at gcc dot gnu.org 2023-03-18 17:31 ` pault at gcc dot gnu.org 2023-03-18 17:34 ` pault at gcc dot gnu.org 2023-03-18 17:35 ` pault at gcc dot gnu.org 2023-04-14 13:59 ` pault at gcc dot gnu.org 2023-04-14 14:11 ` pault at gcc dot gnu.org 2023-04-14 14:13 ` pault at gcc dot gnu.org 2023-05-22 6:40 ` trnka at scm dot com 2023-09-29 12:57 ` cvs-commit at gcc dot gnu.org 2023-09-29 13:13 ` cvs-commit at gcc dot gnu.org 2023-10-04 7:26 ` cvs-commit at gcc dot gnu.org 2023-10-04 8:22 ` cvs-commit at gcc dot gnu.org 2023-10-04 8:24 ` pault at gcc dot gnu.org 2023-11-28 15:39 ` andrewjenner at gcc dot gnu.org 2024-04-08 11:14 ` vterzi1996 at gmail dot com
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=bug-37336-4-xResIMLijZ@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).