Subject: bin/17832: poor formatting of ktr_user data
To: None <gnats-bugs@gnats.netbsd.org>
From: None <paul@whooppee.com>
List: netbsd-bugs
Date: 08/04/2002 06:19:28
>Number: 17832
>Category: bin
>Synopsis: poor formatting of ktr_user data
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 04 06:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Paul Goyette
>Release: NetBSD 1.6A
>Organization:
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Network Engineer | 9DC5 05CF 1AE7 DC42 CCC6 | paul@whooppee.com |
| & World Cruiser | 6858 051E 7AD2 A6B2 4954 | pgoyette@juniper.net |
----------------------------------------------------------------------
>Environment:
System: NetBSD pc1.whooppee.com 1.6A NetBSD 1.6A (PC1) #14: Sun Jun 9 13:08:20 PDT 2002 paul@pc1.whooppee.com:/usr/obj/.i386/sys/arch/i386/compile/PC1 i386
Architecture: i386
Machine: i386
>Description:
Formatting of the data portion of ktr_user records is currently
done by treating each byte as a char and writing it with format
%x. On some platforms, char is implicitly signed, so the %x
format may print 1, 2, or 9 hex digits. Since there is no space
between the bytes, it is impossible to divine the actual data
being displayed.
>How-To-Repeat:
Define MALLOC_OPTIONS U in your environment, and then ktrace -tu
some program that does malloc()s. Examine the output.
>Fix:
Cast each byte to an unsigned char before printing, force the
field width to 2 hex digits (%02x). Also would be nice to use
some spacing, so format "%02x " would be nice.
>Release-Note:
>Audit-Trail:
>Unformatted: