[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: |
arnold |
Subject: |
Re: [bug-gawk] GAWK 4.1.60: Memory Leak in DIV() function |
Date: |
Tue, 29 Jul 2014 12:56:53 -0600 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
"Andrew J. Schorr" <address@hidden> wrote:
> 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
Great. I'll be pushing a more complete fix, probably tomorrow.
Thanks,
Arnold