Bug 99170

Summary: gawk-3.1.3 mishandling of uninitialized variables
Product: [Retired] Red Hat Raw Hide Reporter: Bill Rugolsky, Jr. <bill>
Component: gawkAssignee: Florian La Roche <laroche>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://mail.gnu.org/archive/html/bug-gnu-utils/2003-07/msg00261.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-15 16:18:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bill Rugolsky, Jr. 2003-07-15 13:58:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
The patch at the above URL from the gawk maintainer is needed so that
uninitialized variables passed to functions and used in a scalar context do not
generate an internal error.  Without the patch, the following fails:

function f(x) { return x }

BEGIN {
   f(z) 
   f(z) # this second invocation generates an internal error
   exit 0
}


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

How reproducible:
Always

Steps to Reproduce:
1. Test code in bug.gawk
2. gawk -f bug.gawk

Actual Results:  $ gawk -f bug.gawk
gawk: bug.gawk:5: fatal error: internal error
Aborted

Expected Results:  Exits silently.

Additional info:

gawk-3.1.3 has many additional changes to io.c.  There were numerous I/O
problems in 3.1.2 related to the I/O rewrite, which seem to have been resolved,
but there may be dragons.

Comment 1 Florian La Roche 2003-07-15 16:18:17 UTC
http://people.redhat.com/laroche/ contains the new src.rpm. Thanks for putting in
this bugzilla request,

Florian La Roche