Debian Bug report logs - #303825
mawk: printf %x clamps numbers to signed range rather than unsigned range

version graph

Package: mawk; Maintainer for mawk is Steve Langasek <vorlon@debian.org>; Source for mawk is src:mawk.

Reported by: BROKEN <BROKEN.amc@nicemice.net>

Date: Fri, 8 Apr 2005 23:48:03 UTC

Severity: normal

Tags: fixed-upstream

Merged with 303827

Found in version 1.3.3-11

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#303825; Package mawk. Full text and rfc822 format available.

Acknowledgement sent to BROKEN <BROKEN.amc@nicemice.net>:
New Bug report received and forwarded. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: BROKEN <BROKEN.amc@nicemice.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: mawk: printf %x clamps numbers to signed range rather than unsigned range
Date: Fri, 08 Apr 2005 23:34:50 +0000
Package: mawk
Version: 1.3.3-11
Severity: normal


The %x printf conversion is supposed to treat its argument as an
unsigned int (see printf(3)).  But look what mawk does:

$ mawk 'END { printf("%x %x\n", 2e9, 3e9) }' < /dev/null
77359400 7fffffff

Compare this to gawk:

$ gawk 'END { printf("%x\n", 2e9, 3e9) }' < /dev/null
77359400 b2d05e00

The range of unsigned int (on 32-bit platforms) goes up to ffffffff, not
7fffffff.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (900, 'testing'), (700, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages mawk depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an

-- no debconf information



Message sent on to BROKEN <BROKEN.amc@nicemice.net>:
Bug#303825. (Mon, 13 Jul 2009 00:48:02 GMT) Full text and rfc822 format available.

Message #8 received at 303825-submitter@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: 303825-submitter@bugs.debian.org
Subject: re: #303825 mawk: printf %x clamps numbers to signed range rather than unsigned range
Date: Sun, 12 Jul 2009 20:45:21 -0400
[Message part 1 (text/plain, inline)]
This is fixed in the current version at

	ftp://invisible-island.net/mawk/

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Added tag(s) fixed-upstream. Request was from Thomas Dickey <dickey@his.com> to control@bugs.debian.org. (Tue, 28 Jul 2009 08:51:31 GMT) Full text and rfc822 format available.

Merged 303825 303827. Request was from Thomas Dickey <dickey@his.com> to control@bugs.debian.org. (Tue, 28 Jul 2009 08:54:10 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 09:52:13 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.