Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2000 23:56:32 +0000
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Luke Hollins <lwh@pathcom.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: top sorting error
Message-ID:  <20000324235632.A5605@walton.maths.tcd.ie>
In-Reply-To: <20000324200421.A59323@bell.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Fri, Mar 24, 2000 at 08:04:21PM %2B0000
References:  <Pine.BSF.4.21.0003241256490.99991-100000@PHOENIX.ZER0.NET> <20000324200421.A59323@bell.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 24, 2000 at 08:04:21PM +0000, David Malone wrote:

> It seems to be an overflow problem - top was reilying on things
> fitting into a int, which were 64 bits long. It looks like someone
> ran into the problem before for the %cpu field, and fixed it in a
> different way. This patch below should fix it regardless of the
> type of the variable.

I notice this was fixed in version 1.28 by bde, though he only changed
the check on the 64 bit field. The commit message says:

   Fixed sorting on time.  On i386's, time differences of more than 2147
   seconds caused overflow.  Use a type-safe but slightly slower comparison.
   Comparisons for other fields are still fragile.

Maybe this could be MFC'ed into RELENG_3? My patch would make all the
comparisons in the robust, but slightly slower way.

	David.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000324235632.A5605>