[Bug 13431] New: pmap output wrongly formated on 32bit system
bugzilla at busybox.net
bugzilla at busybox.net
Tue Jan 5 17:08:28 UTC 2021
https://bugs.busybox.net/show_bug.cgi?id=13431
Bug ID: 13431
Summary: pmap output wrongly formated on 32bit system
Product: Busybox
Version: 1.32.x
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: ronald.wahl at raritan.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
Commit aad76968cd5 (pmap: make 32-bit version work better on 64-bit kernels)
broke formatting on 32bit system:
--8<--
# pmap -x $$
1121: -sh
Address Kbytes PSS Dirty Swap Mode Mapping
0000000008048000 336 105 0 0 r-xp /bin/busybox
000000000809c000 4 4 4 0 r--p /bin/busybox
000000000809d000 4 4 4 0 rw-p /bin/busybox
0000000009933000 12 12 12 0 rw-p [heap]
00000000b7f00000 504 12 0 0 r-xp
/lib/libuClibc-1.0.36.so
00000000b7f7e000 4 4 4 0 r--p
/lib/libuClibc-1.0.36.so
00000000b7f7f000 4 4 4 0 rw-p
/lib/libuClibc-1.0.36.so
00000000b7f80000 96 20 20 0 rw-p [ anon ]
00000000b7f98000 12 0 0 0 r--p [vvar]
00000000b7f9b000 4 0 0 0 r-xp [vdso]
00000000b7f9c000 28 0 0 0 r-xp
/lib/ld-uClibc-1.0.36.so
00000000b7fa3000 4 4 4 0 r--p
/lib/ld-uClibc-1.0.36.so
00000000b7fa4000 4 4 4 0 rw-p
/lib/ld-uClibc-1.0.36.so
00000000bf8b9000 132 12 12 0 rw-p [stack]
-------- ------ ------ ------ ------
total 1148 185 68 0
--8<--
>From procps/pmap.c:
#if ULONG_MAX == 0xffffffff
# define TABS "\t"
# define AFMT "8"
# define DASHES ""
#else
# define TABS "\t\t"
# define AFMT "16"
# define DASHES "--------"
#endif
AFMT is not used anymore.
The following condition is bogus - ULLONG_MAX will never be 0xffffffff because
long long is (at least) a 64bit value.
TABS/DASHES should be consistent to the AFMTLL value below.
#if ULLONG_MAX == 0xffffffff
# define AFMTLL "8"
#else
# define AFMTLL "16"
#endif
Maybe replace all of this by
#define AFMTLL "16"
#define TABS "\t\t"
#define DASHES "--------"
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list