Bug 30825

Summary: awk (gawk) version 5.2.0 breaks pcb-rnd due to internal error
Product: Mageia Reporter: Barry Jackson <zen25000>
Component: RPM PackagesAssignee: Base system maintainers <basesystem>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: fri, marja11, pterjan, shlomif
Version: CauldronKeywords: UPSTREAM
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: gawk-5.2.0-2.mga9.src.rpm CVE:
Status comment:

Description Barry Jackson 2022-09-07 13:35:54 CEST
Description of problem: When trying to use parametric footprints the following failure happens with certain funtions e.g.connector().
awk: /usr/share/pcb-rnd/footprint/parametric/common_subc.awk:1035: fatal: internal error: file interpret.h, line 254: unexpected parameter type Node_val

The following was run in the pcb-rnd source tree at the request of the pcb-rnd developer:
[baz@localhost $  cd /home/baz/SVN/pcb-rnd/trunk/footprint/parametric
[baz@localhost parametric]$ ./connector 1,7,silkmark=square
awk: ./common_subc.awk:1035: fatal: internal error: file interpret.h, line 254: unexpected parameter type Node_val

This appears to be a gawk bug introduced in the latest version a few days ago.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 Morgan Leijström 2022-09-07 15:26:51 CEST
I see shlomi fixed 5.0.1

CC: (none) => fri, shlomif

Comment 2 Marja Van Waes 2022-09-08 22:19:42 CEST
(In reply to Morgan Leijström from comment #1)
> I see shlomi fixed 5.0.1

I thought you meant to say we've had this issue before and that Shlomi fixed it, but I can't find that.

3 Years ago Shlomi updated gawk to 5.0.1 and he later rebuilt the same version, I don't see any mention of a similar bug to this one.

Anyway, assigning to the Base System maintainers.

CC: (none) => marja11
Assignee: bugsquad => basesystem

Comment 3 Morgan Leijström 2022-09-08 22:27:09 CEST
I could be more clear, sorry. I intended to just indicate who maybe knows how to fix the current issue, based on who earlier touched the package.
Comment 4 Marja Van Waes 2022-09-08 22:45:28 CEST
(In reply to Morgan Leijström from comment #3)
> I could be more clear, sorry. I intended to just indicate who maybe knows
> how to fix the current issue, based on who earlier touched the package.

Thanks for the clarification, Morgan. Unfortunately, Shlomi has left us. I hope he'll return like he did several times before.
Comment 5 Barry Jackson 2022-09-09 12:16:39 CEST
(In reply to Marja Van Waes from comment #4)
> (In reply to Morgan Leijström from comment #3)
> > I could be more clear, sorry. I intended to just indicate who maybe knows
> > how to fix the current issue, based on who earlier touched the package.
> 
> Thanks for the clarification, Morgan. Unfortunately, Shlomi has left us. I
> hope he'll return like he did several times before.

Yes I also searched the commit messages looking for a similar issue fixed by Shlomi ;)

This is almost certainly an upstream issue.

I have replaced the instances of awk (gawk) with mawk in the scripts affected and the problem is not there, however pcb-rnd upstream do not want our package patched to add a dependency on mawk as gawk, quite rightly should be fixed.

It's unclear what was changed in gawk since the previous version as apparently they made too many changes to include them all in the changelog!

Keywords: (none) => UPSTREAM

Comment 6 Barry Jackson 2022-09-09 12:36:25 CEST
As a point of interest the lead pcb-rnd developer is the author of libmawk http://repo.hu/projects/libmawk/ so I am happy to accept his opinion that this is a gawk bug :)
Comment 7 Pascal Terjan 2022-09-13 12:44:02 CEST
This needs to be reported upstream, the code failing is:

function foo(x)
{
        if (x == int(x))
                return (int(x) != 0)
}
BEGIN {
        foo(P["bar"])
}

CC: (none) => pterjan

Comment 8 Barry Jackson 2022-09-13 15:31:58 CEST
Thanks, is that an adequate example to send upstream? I know nothing of awk.
I am happy to report it, but don't feel qualified to explain it.
What would you suggest as a summary?
Comment 9 Pascal Terjan 2022-09-14 16:10:07 CEST
This seems similar to https://lists.gnu.org/archive/html/bug-gawk/2022-09/msg00032.html
Comment 10 Pascal Terjan 2022-09-14 16:36:30 CEST
I reported it at https://lists.gnu.org/archive/html/bug-gawk/2022-09/msg00055.html
Comment 11 Pascal Terjan 2022-09-14 22:15:28 CEST
Upstream provided a patch and after verifying it fixes the problem 5.2.0-3 is now building

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 12 Barry Jackson 2022-10-06 02:30:11 CEST
It was not in cauldron so I guess it did not build?
I pushed it again.