[Top][All Lists]

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

Re: double free error in gawk

From: arnold
Subject: Re: double free error in gawk
Date: Thu, 02 Jul 2020 12:30:14 -0600
User-agent: Heirloom mailx 12.5 7/5/10

"Andrew J. Schorr" <aschorr@telemetry-investments.com> wrote:

> This does make one wonder: that code simply copies n->flags from r->flags,
> and now it's turning off MPFN and MPZN. Is it clear that the other
> flags are correct?

You are asking hard questions.  The code predates MPFR, which is
the main problem. You want to keep most of the flags, such as
NUMCUR and the non-MPFR numeric value if you've got it.

> Should we perhaps simply set n->flags explicitly
> instead of copying it from the previous field? Is it supposed

It's at least STRING|STRCUR.  And NUMCUR if you've got it, 'cause
why not?  I'd have to review the other flags to see what makes

Hmm, if MP* flags were set, then I should clear NUMCUR too.  Yech.

One day I'll rewrite this in nicely object oriented C++ and it'll
get cleaner.  Maybe after we get World Peace.



reply via email to

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