bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] GAWK 4.1.60: Memory Leak in DIV() function


From: Andrew J. Schorr
Subject: Re: [bug-gawk] GAWK 4.1.60: Memory Leak in DIV() function
Date: Tue, 29 Jul 2014 14:54:43 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

On Tue, Jul 29, 2014 at 12:45:22PM -0600, address@hidden wrote:
> Thanks for the bug report. I believe that the patch below fixes
> the problem.
> 
> Arnold
> ----------------
> diff --git a/mpfr.c b/mpfr.c
> index e9c9d15..934f091 100644
> --- a/mpfr.c
> +++ b/mpfr.c
> @@ -1239,6 +1239,8 @@ do_mpfr_div(int nargs)
>       mpz_tdiv_qr(quotient->mpg_i, remainder->mpg_i, num->mpg_i, 
> denom->mpg_i);
>       unref(num);
>       unref(denom);
> +     unref(numerator);
> +     unref(denominator);
>  
>       sub = make_string("quotient", 8);
>       lhs = assoc_lookup(result, sub);

Yes!  That fixes it.  Katie's script now runs in 22 seconds on my linux box.

Regards,
Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]