Hi,

A few days ago, I noticed htop crashes sometimes on my system (OpenBSD
6.4), whether it’s coming from the port or built from the upstream
source. The port version is more stable but still crashes sometimes at
start.

I can easily reproduce the issue with the following one-liner:

    while ( (sleep 0.1 && echo 'q') | htop ); do false; done

The loop stops after a few seconds or minutes with a core dump.

I fixed the off-by-one error causing the bug in the following patch I
submitted to upstream. I’m pretty much new in the OpenBSD world, so
reviews and comments from experienced OpenBSD people are highly
appreciated.

HTML page for web browsers: https://github.com/hishamhm/htop/pull/868

Raw text patch:
https://patch-diff.githubusercontent.com/raw/hishamhm/htop/pull/868.patch

Regards,
Antoine

Reply via email to