[Toybox] top -H segfault
Rob Landley
rob at landley.net
Tue May 24 14:23:00 PDT 2016
On 05/23/2016 07:59 PM, enh wrote:
> just running home, so no time to debug further, but in case you
> haven't seen this yet... plain "top -H" is segfaulting for me before
> displaying anything.
Hmmm, no I hadn't seen that. But I do see that ./toybox top -H isn't
displaying anything when I do that...
Ah. The active node logic changed and I missed updating a spot. (I
tested it, but nothing I tested used "collate". Oops. I need to work out
how to add this sort of stuff to the test suite. Probably have to use
archival snapshots of "ps" contents to get consistent reproducible test
output...)
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004219c1
> in top_common (filter=filter at entry=0x41f738 <merge_deltas>) at
> toys/posix/ps.c:1349
> 1349 if (old.count && (!new.count || *otb->slot < *ntb->slot)) {
Null dereference on *otb and *ntb because now you traverse the tree in
order and keep each node that has a non-null ->extra field.
Try now?
Rob
More information about the Toybox
mailing list