top crashes when passed ridiculously large PIDs

Hi. I've tried to find previous reports of this issue but did not see one. My apologies if it's a duplicate.

The following crashes on multiple systems I've tried:

top -b -n1 -H -p 92233720368547758071

It results in a SEGV on Ubuntu, arch, and a Yocto-based distribution we use. The Yocto-based one, at least, is using 4.0.4.

While it would largely be a cosmetic fix to throw an error instead, it might be helpful to someone.

Thanks!

Assignee Loading
Time tracking Loading