bug-gawk
[Top][All Lists]
Advanced

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

Re: indirect function call issues (2)


From: mekanofox
Subject: Re: indirect function call issues (2)
Date: Wed, 15 Jan 2025 09:23:21 -0800
User-agent: Purely Mail via Roundcube/1.6.8

Maybe something along the lines of ...

diff --git a/awk.h b/awk.h
index b8f01329d..a956ae927 100644
--- a/awk.h
+++ b/awk.h
@@ -1981,6 +1981,10 @@ force_string_fmt(NODE *s, const char *fmtstr, int fmtidx)
                return s;
        }

+       if (s->type == Node_var_new) {
+               s = dupnode(Nnull_string);
+       }
+
        if ((s->flags & STRCUR) != 0
                && (s->stfmt == STFMT_UNUSED || (s->stfmt == fmtidx
 #ifdef HAVE_MPFR

That even passes the 'make check'; but I didn't dig into all the corners yet.


On 2025-01-15 06:05, arnold@skeeve.com wrote:

Eli Zaretskii <eliz@gnu.org> wrote:

From: Denis Shirokov <cosmogen@gmail.com>
Date: Wed, 15 Jan 2025 01:13:25 +0200

I have identified two issues related to indirect function calls into
built-in functions of AWK. The attached script contains both scenarios to
reproduce the identified problems.

GNU Awk 5.3.1, API 4.0, (GNU MPFR 4.0.2, GNU MP 6.1.2)
downloaded from ezwinports
How do you run this script?

You have to change his 'if (0)' to 'if (1)'.

I've spent almost all day debugging this.  The problem is very
much a corner case, but there are some things that need fixing.

It's still a work in progress, but having more eyes on it may help too.

Thanks,

Arnold



reply via email to

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