Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921503 - sys-apps/gawk-5.3.0: match() chokes on uninitialized array
Summary: sys-apps/gawk-5.3.0: match() chokes on uninitialized array
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 923874
Blocks:
  Show dependency tree
 
Reported: 2024-01-06 16:14 UTC by Rainer W
Modified: 2024-02-06 07:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer W 2024-01-06 16:14:45 UTC
$ gawk --version
  GNU Awk 5.3.0, API 4.0
  ....
$ gawk -v b=1111-22-33 -v r="^([0-9]{4}(-[0-9]{2}(-[0-9]{2})?)?)?$" '
END { match(b,"^([^,]*)(,(.*))?$",m)
      print m[1]

      print match(m[1],r)
      print match(m[3],r)
    } ' /dev/null
1111-22-33
1
gawk: cmd. line:6: fatal error: internal error
Aborted
$
Comment 1 Greg Kubaryk 2024-01-06 21:54:40 UTC
This seems like something that should probably be reported upstream unless you have reason to believe it is gentoo-specific?
Comment 2 Rainer W 2024-01-07 13:22:18 UTC
(In reply to Greg Kubaryk from comment #1)
> This seems like something that should probably be reported upstream unless
> you have reason to believe it is gentoo-specific?

Since the above code worked in umpteen versions of "gawk" up to and including 5.2.2, the new version potentially breaks plenty of "gawk" programmes.  So it
could at least be again set to non-stable or even be soft-blocked.

Apart from that I simply cannot judge whether or not this is a Gentoo-specific
bug.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 13:51:40 UTC
I've forwarded it upstream at https://lists.gnu.org/archive/html/bug-gawk/2024-01/msg00013.html. They usually respond very quickly to bugs so I'll wait for that first.
Comment 4 Larry the Git Cow gentoo-dev 2024-01-28 23:31:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f8ef094bd4fb0dfaf7ab70fc79fc826eb0540b8

commit 6f8ef094bd4fb0dfaf7ab70fc79fc826eb0540b8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-28 23:31:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-28 23:31:24 +0000

    sys-apps/gawk: backport str2wstr fix
    
    Closes: https://bugs.gentoo.org/921503
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/gawk/files/gawk-5.3.0-str2wstr.patch | 193 ++++++++++++++++++++++++++
 sys-apps/gawk/gawk-5.3.0-r1.ebuild            | 140 +++++++++++++++++++
 2 files changed, 333 insertions(+)