This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: coverage.c: Fix leak of da_file_name
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 10 Oct 2013 14:08:38 -0400
- Subject: Re: coverage.c: Fix leak of da_file_name
- Authentication-results: sourceware.org; auth=none
- References: <1381364302 dot 30976 dot 14 dot camel at surprise> <CAKOQZ8xw9iqxxLW6JCUy9u8eGk=+iQ7Awv8aGyz011u0qhucHg at mail dot gmail dot com>
On Wed, 2013-10-09 at 19:56 -0700, Ian Lance Taylor wrote:
> On Wed, Oct 9, 2013 at 5:18 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> > coverage_init allocates da_file_name using XNEWVEC, but it is never
> > freed. This shows up as a slow memory leak in my JIT code when
> > repeatedly invoking the compiler code within a single process.
> >
> > This patch frees it in coverage_finish with XDELETEVEC (and NULLs it to
> > be sure).
> >
> > Bootstrapped and regtested against trunk on x86_64-unknown-linux.
> >
> > OK for trunk?
>
> This is OK.
Thanks; committed to trunk as r203388.