Re: coverage.c: Fix leak of da_file_name

2013-10-10 Thread David Malcolm
On Wed, 2013-10-09 at 19:56 -0700, Ian Lance Taylor wrote: > On Wed, Oct 9, 2013 at 5:18 PM, David Malcolm 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 wi

Re: coverage.c: Fix leak of da_file_name

2013-10-09 Thread Ian Lance Taylor
On Wed, Oct 9, 2013 at 5:18 PM, David Malcolm 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 w

coverage.c: Fix leak of da_file_name

2013-10-09 Thread David Malcolm
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 reg