Bug 160421 - crash when using non-decimal data in command line parameters
crash when using non-decimal data in command line parameters
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gawk (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Brock Organ
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-14 20:59 EDT by Ulrich Drepper
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-15 12:54:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix the bug (865 bytes, patch)
2005-06-14 20:59 EDT, Ulrich Drepper
no flags Details | Diff
alternative patch by Arnold (3.60 KB, patch)
2005-06-15 16:01 EDT, Ulrich Drepper
no flags Details | Diff

  None (edit)
Description Ulrich Drepper 2005-06-14 20:59:26 EDT
Description of problem:
When the --non-decimal-data option is used and a variable gets assigned at the
command line a non-decimal value, gawk crashes.

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

How reproducible:
always

Steps to Reproduce:
1.run gawk --non-decimal-data -v a=0x1 'BEGIN { print a+0 }'
2.
3.
  
Actual results:
gawk: fatal error: internal error
Aborted

(since gawk catches SIGSEGV)

Expected results:
1

Additional info:
I'll attach a patch.  The localeconv() call must in any case be moved before the
loop initializing the variables.  If the setlocale() call, which also is moved,
must really come as late as it did, the patch must be changed to switch back
after the localeconv() call.
Comment 1 Ulrich Drepper 2005-06-14 20:59:27 EDT
Created attachment 115448 [details]
Patch to fix the bug
Comment 2 Karel Zak 2005-06-15 12:54:53 EDT
The patch with small changes sent to upstream and applied to FC4. The update
gawk-3.1.4-5.1 will be available ASAP. Thanks.
Comment 3 Ulrich Drepper 2005-06-15 16:01:09 EDT
Created attachment 115502 [details]
alternative patch by Arnold

The gawk maintainer proposed the following patch.

Note You need to log in before you can comment on or make changes to this bug.