hex print in mawk does not work on ubuntu 64bit

Bug #321890 reported by Jason Wessel
4
Affects Status Importance Assigned to Milestone
mawk (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mawk

If mawk is installed as the default awk on a 64 bit host certain scripts such as the rpm2cpio.sh fail to work correctly. The problem was found on ubuntu 7.10 64 bit but shows up on 8.04 64 bit and 8.10 64 bit as well. It appears that at least on ubuntu 8.04 32 bit that this problem also occurs

The test case is very simple. gawk prints the correct result and mawk does not.

% echo . | gawk '{ printf("%c%c", 0x1f, 0x8b); }' |hexdump
0000000 8b1f
0000002

% echo . | mawk '{ printf("%c%c", 0x1f, 0x8b); }' |hexdump
0000000 3030
0000002

ProblemType: Bug
Architecture: amd64
Date: Tue Jan 27 08:43:51 2009
DistroRelease: Ubuntu 7.10
NonfreeKernelModules: nvidia
Uname: Linux ord-jwessel2 2.6.22-16-generic #1 SMP Mon Nov 24 17:50:35 GMT 2008 x86_64 GNU/Linux

Tags: apport-bug
Revision history for this message
Thomas Dickey (dickey-his) wrote :

It doesn't appear to be related to 64-bits. The values correspond
to the first character of the parameters. Incidentally, mawk's
behavior matches awk's (perhaps gawk's behavior is an extension).

Revision history for this message
Thomas Dickey (dickey-his) wrote :

The behavior in question is a gawk extension (non-standard),
and has been there a while, as documented in this rather old
link:

http://www.delorie.com/gnu/docs/gawk/gawk_214.html

Changed in mawk (Ubuntu):
status: New → Fix Released
Revision history for this message
Thomas Dickey (dickey-his) wrote :

I see the status changed, indicating that a fix was release - but see no corresponding package change.

Revision history for this message
Thomas Dickey (dickey-his) wrote :

To refresh my memory, I compared with one-true-awk (mawk and Kernighan's awk behave the same in this case).
ymmv

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.