0e68b604ab
rawcpu of type int, is declared inside main(){} and it can be passed as uninitialized to setpinfo(). The setpinfo() function has a switch checking the value of rawcpu: if (!rawcpu) pi[i].pcpu /= 1.0 - exp(ki[i].p_swtime * log_ccpu); rawcpu is set to 1 with the command line argument "-C". -C Change the way the CPU percentage is calculated by using a "raw" CPU calculation that ignores "resident" time (this normally has no effect). Bug reproducible with an invocation: "ps u". It hides with "ps uC". Initialize rawcpu by default to 0, before the getopt(3) machinery. Detected with MSan running on NetBSD/amd64. Sponsored by <The NetBSD Foundation> |
||
---|---|---|
.. | ||
cat | ||
chio | ||
chmod | ||
cp | ||
csh | ||
date | ||
dd | ||
df | ||
domainname | ||
echo | ||
ed | ||
expr | ||
hostname | ||
kill | ||
ksh | ||
ln | ||
ls | ||
mkdir | ||
mt | ||
mv | ||
pax | ||
ps | ||
pwd | ||
rcmd | ||
rcp | ||
rm | ||
rmdir | ||
sh | ||
sleep | ||
stty | ||
sync | ||
test | ||
Makefile | ||
Makefile.inc |