https://bugzilla.novell.com/show_bug.cgi?id=218161
Summary: gawk crashes
Product: SUSE Linux 10.1
Version: Final
Platform: i686
OS/Version: SuSE Linux 10.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@forge.provo.novell.com
ReportedBy: ptaylor@quadlogic.fr
QAContact: qa@suse.de
Suse 10.1
$> uname -a
Linux web99 2.6.16.21-0.25-smp #1 SMP Tue Sep 19 07:26:15 UTC 2006 i686 i686
i386 GNU/Linux
$> rpm -qa | grep awk
gawk-3.1.5-18
$> gawk --version | head -n 1
GNU Awk 3.1.5
I came across a problem using a program 'cdb' which uses gawk, it crashes when
used.
After searching,I found another Suse 10.1 user Pablo Costa who had the same
problem. He created the following script to generate the error.
## Start
cd /tmp
# the script; PLEASE take care if you copy on your own file
# to remove the BACKSLASH just before the DOLLAR; It's
# there to prevent the shell from evaluating $i when copy/pasting.
cat > problem.awk <<-EOF
{
print "RECORD " NR;
for ( i = 0; length( \$i ) > 0; i++ ) print " FIELD " i " of " NF;
}
EOF
# It doesn't seem to really matter what kind of input you
# give to the script. Also it doesn't matter if it's given
# on a file via gawk command line invocation or if it's fed
# via stdin through a pipe.
cat > awk_example <