Isn't this a case of netbsd returning a perfectly valid number that meminfo has misinterpreted as a negative number (-773). Hobbit has then seen the negative number and incorrectly handled it as a very large positive number.
Netbsd doesn't appear to have a bug based on this evidence.
Offcourse if netbsd is returning a negative number to meminfo then they do have a bug. However, since the bug in the meminfo code could easily have caused the error seen, we can't know if netbsd also has the same bug. If the fix to meminfo works (and I'm guessing it does) then it's pretty solid proof that there isn't an underlying problem in netbsd.
I don't have a copy of netbsd to double check this.
Regards,
Brian Scott
-----Original Message----- From: Rich Smrcina [mailto:rsmrcina at wi.rr.com] Sent: Thursday, 13 November 2008 3:43 PM To: hobbit at hswn.dk Subject: Re: [hobbit] overflow in netbsd-meminfo.c
Tracy Di Marco White wrote:
That appears to be a bug in netbsd.
This is what it appears as in meminfo for one of my 4GB machines: [meminfo] Total:-773 Free:2884 Swaptotal:4098 Swapused:0
Since freebsd-meminfo.c seems to be using unsigned long in the same place I modified it, I'm not sure it's a bug only in NetBSD.
The display is a bug, Hobbit's interpretation and use of it is an artifact of the bug.
If netbsd doesn't have a fix for this problem, you're patch is the right solution.
Rich Smrcina VM Assist, Inc. Phone: 414-491-6001 Ans Service: 360-715-2467 http://www.linkedin.com/in/richsmrcina
Catch the WAVV! http://www.wavv.org WAVV 2009 - Orlando, FL - May 15-19, 2009
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender.