[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fatal: internal error Ver 5.2.0 readall()
From: |
Andrew J. Schorr |
Subject: |
Re: fatal: internal error Ver 5.2.0 readall() |
Date: |
Mon, 26 Sep 2022 16:14:25 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
FYI, this used to work properly. When I checkout gawk as of commit
508e9368d2d461b2290af6787cad6dfbed357176, this error does not occur:
sh-5.1$ ./gawk -l extension/.libs/rwarray.so -f /tmp/write.awk
writeall returns 1
sh-5.1$ ./gawk -l extension/.libs/rwarray.so -f /tmp/read.awk
arr1: len=0
readall returns 1
arr1: len=0
According to git bisect, I introduced the problem in subsequent commit
07d04b91d1ac3e19fda5e029f1a244ea714c1d13. I need to dig in and figure out what
I broke.
Regards,
Andy
On Wed, Sep 14, 2022 at 07:37:17AM -0400, Andrew J. Schorr wrote:
> Ah, OK, that makes sense. I will get to this stuff, but it may take a couple
> of months.
>
> Regards,
> Andy
>
> On Wed, Sep 14, 2022 at 12:39:24AM -0600, arnold@skeeve.com wrote:
> > I did see it when I looked closer. I didn't copy paste the reader
> > program correctly the first time.
> >
> > In any case, calling readall() as the first thing works correctly.
> >
> > Andy, I will leave the namespace stuff for you to resolve. I think
> > you will have to look for names of the form foo::bar and split them
> > apart when installing the variable, but I don't remember for sure.
> >
> > Thanks,
> >
> > Arnold
> >
> > "Andrew J. Schorr" <aschorr@telemetry-investments.com> wrote:
> >
> > > I expected you to say that. But I'm just curious -- do you not see
> > > the same error I'm seeing? You said above that it does not reproduce,
> > > so I'm confused by that.
> > >
> > > I will dig into this at some point.
> > >
> > > Regards,
> > > Andy
> > >
> > > On Tue, Sep 13, 2022 at 01:10:27PM -0600, arnold@skeeve.com wrote:
> > > > 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
> > > >
> > >
> > > --
> > > 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
> >
>
> --
> 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
--
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
- Re: fatal: internal error Ver 5.2.0 readall(), (continued)
Re: fatal: internal error Ver 5.2.0 readall(), arnold, 2022/09/11
- Re: fatal: internal error Ver 5.2.0 readall(), Andrew J. Schorr, 2022/09/11
- Re: fatal: internal error Ver 5.2.0 readall(), Andrew J. Schorr, 2022/09/11
- Re: fatal: internal error Ver 5.2.0 readall(), arnold, 2022/09/13
- Re: fatal: internal error Ver 5.2.0 readall(), J Naman, 2022/09/13
- Re: fatal: internal error Ver 5.2.0 readall(), Andrew J. Schorr, 2022/09/13
- Re: fatal: internal error Ver 5.2.0 readall(), arnold, 2022/09/14
- Re: fatal: internal error Ver 5.2.0 readall(), Andrew J. Schorr, 2022/09/14
- Re: fatal: internal error Ver 5.2.0 readall(),
Andrew J. Schorr <=
- Re: fatal: internal error Ver 5.2.0 readall(), arnold, 2022/09/28
- Re: fatal: internal error Ver 5.2.0 readall(), Andrew J. Schorr, 2022/09/28
- Re: readall bugs [PATCH], Andrew J. Schorr, 2022/09/30