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:
Clone Of:
Environment:
Last Closed: 2005-06-15 16:54:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to fix the bug (865 bytes, patch)
2005-06-15 00:59 UTC, Ulrich Drepper
no flags Details | Diff
alternative patch by Arnold (3.60 KB, patch)
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.