From: Joseph Myers <joseph@codesourcery.com>
To: Alex Coplan <alex.coplan@arm.com>
Cc: <gcc-patches@gcc.gnu.org>, <jit@gcc.gnu.org>, <nd@arm.com>
Subject: Re: [PATCH] libgccjit: Fix several memory leaks in the driver
Date: Thu, 20 Aug 2020 22:26:20 +0000 [thread overview]
Message-ID: <alpine.DEB.2.21.2008202225350.13981@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20200709201308.ngxjyakuxapc4yti@arm.com>
On Thu, 9 Jul 2020, Alex Coplan wrote:
> 2020-07-09 Alex Coplan <alex.coplan@arm.com>
>
> * gcc.c (set_static_spec): New.
> (set_static_spec_owned): New.
> (set_static_spec_shared): New.
> (driver::maybe_putenv_COLLECT_LTO_WRAPPER): Use
> set_static_spec_owned() to take ownership of lto_wrapper_file
> such that it gets freed in driver::finalize.
> (driver::maybe_run_linker): Use set_static_spec_shared() to
> ensure that we don't try and free() the static string "ld",
> also ensuring that any previously-allocated string in
> linker_name_spec is freed. Likewise with argv0.
> (driver::finalize): Use set_static_spec_shared() when resetting
> specs that previously had allocated strings; remove if(0)
> around call to free().
OK with a comment added to set_static_spec, documenting the semantics of
the function and its arguments.
--
Joseph S. Myers
joseph@codesourcery.com
prev parent reply other threads:[~2020-08-20 22:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 20:13 Alex Coplan
2020-08-20 22:26 ` Joseph Myers [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=alpine.DEB.2.21.2008202225350.13981@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=alex.coplan@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jit@gcc.gnu.org \
--cc=nd@arm.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).