Subject: bin/17832: poor formatting of ktr_user data
To: None <>
From: None <>
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
>Originator:     Paul Goyette
>Release:        NetBSD 1.6A
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | 9DC5 05CF 1AE7 DC42 CCC6 |   |
|  & World Cruiser | 6858 051E 7AD2 A6B2 4954 | |
System: NetBSD 1.6A NetBSD 1.6A (PC1) #14: Sun Jun 9 13:08:20 PDT 2002 i386
Architecture: i386
Machine: i386
	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.
	Define MALLOC_OPTIONS U in your environment, and then ktrace -tu
	some program that does malloc()s.  Examine the output.
	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.