bug-gawk
[Top][All Lists]
Advanced

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

Re: fatal: internal error Ver 5.2.0 readall()


From: arnold
Subject: Re: fatal: internal error Ver 5.2.0 readall()
Date: Tue, 13 Sep 2022 13:10:27 -0600
User-agent: Heirloom mailx 12.5 7/5/10

So Andy, you now "own" rwarray.c; please put this on your TODO list.

Thanks,

Arnold

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

> Hi,
>
> I'm seeing the same issue as OP on Linux CentOS 7 using the master branch:
>
> bash-4.2$ ./gawk -l extension/.libs/rwarray.so -f /tmp/write.awk
> writeall returns 1
>
> bash-4.2$ ./gawk -l extension/.libs/rwarray.so -f /tmp/read.awk
> arr1: len=0
> readall returns 1
> gawk: /tmp/read.awk:5: fatal: internal error: file interpret.h, line 253: 
> unexpected parameter type Node_val
>
> This sadly seems like a bug to me. If the code instantiates arr1 before
> caling readall, then the saved arr1 in the state file sohuld be ignored
> if all goes according to plan. I'm not sure I have time to troubleshoot
> right now.
>
> Regards,
> Andy
>
> On Sun, Sep 11, 2022 at 01:12:02PM -0600, arnold@skeeve.com wrote:
> > Hi.
> > 
> > In the future, please send source files as attachments, and not with
> > output mixed in to the middle; it makes it easier for me to deal with
> > things.
> > 
> > It turns out that this does reproduce on Linux.
> > 
> > Changing the reader program to be:
> > 
> > @load "rwarray"
> > BEGIN {
> >     ret = readall("foo.binawk");
> >     print ret " = readall(\"foo.binawk\");"
> >     printf("arr1: len=%s\n",length(arr1))
> > }
> > 
> > causes things to work without trouble. In short, you should not
> > force arr1 to be an array using split, but let readall handle setting
> > up the types and the contents.
> > 
> > Thanks,
> > 
> > Arnold
> > 
> > J Naman <jnaman2@gmail.com> wrote:
> > 
> > > # Sorry, I do not have a "gawkbug script"
> > > in a nutshell: readall() gives me 'fatal: internal error: file 
> > > interpret.h,
> > > line 253: unexpected parameter type Node_val' as described below:
> > >
> > > # TEST writeall()
> > > # Gawk ver 5.2.0 (mingw) api3.2 GNU MP 6.1.2 GNU MPFR 4.0.2
> > > @load "rwarray"
> > > BEGIN{
> > > split("",arr1); for(i in SYMTAB) { if(!isarray(SYMTAB[i])){
> > > arr1[i]=SYMTAB[i];}}
> > > ret = writeall("foo.binawk");
> > > print ret " = writeall(\"foo.binawk\");"
> > > exit;
> > > }
> > > # stdout: 1 = writeall("foo.binawk");
> > > # TEST readall()
> > > # Gawk ver 5.2.0 (mingw) api3.2 GNU MP 6.1.2 GNU MPFR 4.0.2
> > > @load "rwarray"
> > > BEGIN{
> > > split("",arr1);
> > > printf("arr1: len=%s\n",length(arr1))
> > > ret = readall("foo.binawk");
> > > print ret " = readall(\"foo.binawk\");"
> > > #**> fatal: internal error: file interpret.h, line 253: unexpected
> > > parameter type Node_val
> > > printf("arr1: len=%s\n",length(arr1))
> > > exit;
> > > }
> > > #===============
> > > # stdout: arr1: len=0
> > > # stdout: 1 = readall("foo.binawk");
> > > # foo_readAll.awk:12: fatal: internal error: file interpret.h, line 253:
> > > unexpected parameter type Node_val
> > >  Note: granted one can use reada() and writea(), but when I got the error
> > > with readall(), I cut out all variables until only the one array was left
> > > that caused the error. Thanks, John
>
> -- 
> Andrew Schorr                      e-mail: aschorr@telemetry-investments.com
> Telemetry Investments, L.L.C.      phone:  917-305-1748
> 152 W 36th St, #402                fax:    212-425-5550
> New York, NY 10018-8765



reply via email to

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