Running pstat with either [-M core] or [-N system] along with the -T option
results in a segmentation fault. Make sure kvm access is initialized prior
to running kvm_read() when -T is specified.
This issue appears to have been introduced when setgid kmem support was
removed in revision 1.99.
Rob
Index: pstat.c
===================================================================
RCS file: /cvs/src/usr.sbin/pstat/pstat.c,v
retrieving revision 1.101
diff -u -p -r1.101 pstat.c
--- pstat.c 11 Dec 2015 11:53:52 -0000 1.101
+++ pstat.c 11 Apr 2016 18:22:35 -0000
@@ -193,7 +193,7 @@ main(int argc, char *argv[])
need_nlist = vnodeflag || dformat;
if (nlistf != NULL || memf != NULL) {
- if (fileflag)
+ if (fileflag || totalflag)
need_nlist = 1;
}