[procps] Re: newlib, ps fix

  • From: Craig Small <csmall-procps@xxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sun, 30 Aug 2015 22:05:23 +1000

On Thu, Aug 27, 2015 at 08:15:02AM -0500, Jim Warner wrote:

No, w currently uses readproctab so with newlib he'll
procps_pids_new
procps_pids_reap
...
procps_pids_unref
It seems my testcode is bad, or possibly its good for finding some
problems with the library.

(gdb) run
Starting program: /home/csmall/Projects/procps/procps/test

Program received signal SIGSEGV, Segmentation fault.
items_check_failed (items=<optimized out>, maxitems=<optimized out>) at
proc/pids.c:797
797 if (items[i] > PROCPS_PIDS_noop) {

I'll attach my test program. I'm probably doing something wrong but it
means the library should be saying what and not crashing about it
either.

I'll eventually write more test scripts for the library and in those
I'll be doing things like sending nulls for parameters etc. We've got
most caught, but obviously not this one.

- Craig
--
Craig Small (@smallsees) http://enc.com.au/ csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5

Other related posts: