Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 160421 - crash when using non-decimal data in command line parameters
Summary: crash when using non-decimal data in command line parameters
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gawk
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-15 00:59 UTC by Ulrich Drepper
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-06-15 16:54:53 UTC


Attachments (Terms of Use)
Patch to fix the bug (deleted)
2005-06-15 00:59 UTC, Ulrich Drepper
no flags Details | Diff
alternative patch by Arnold (deleted)
2005-06-15 20:01 UTC, Ulrich Drepper
no flags Details | Diff

Description Ulrich Drepper 2005-06-15 00:59:26 UTC
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-15 00:59:27 UTC
Created attachment 115448 [details]
Patch to fix the bug

Comment 2 Karel Zak 2005-06-15 16:54:53 UTC
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 20:01:09 UTC
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.