From barney@mx.databus.com  Mon Feb  5 14:43:35 2001
Return-Path: <barney@mx.databus.com>
Received: from mx.databus.com (p101-44.acedsl.com [160.79.101.44])
	by hub.freebsd.org (Postfix) with ESMTP id E5CF437B503
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  5 Feb 2001 14:43:33 -0800 (PST)
Received: (from barney@localhost)
	by mx.databus.com (8.11.1/8.11.1) id f15MhUB28915;
	Mon, 5 Feb 2001 17:43:30 -0500 (EST)
	(envelope-from barney)
Message-Id: <200102052243.f15MhUB28915@mx.databus.com>
Date: Mon, 5 Feb 2001 17:43:30 -0500 (EST)
From: Barney Wolff <barney@databus.com>
Reply-To: barney@databus.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: divide by 0 in healthd
X-Send-Pr-Version: 3.2

>Number:         24884
>Category:       ports
>Synopsis:       divide by 0 in healthd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 05 14:50:01 PST 2001
>Closed-Date:    Tue Feb 6 03:00:48 PST 2001
>Last-Modified:  Tue Feb 06 03:02:00 PST 2001
>Originator:     Barney Wolff
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
Databus Inc.
>Environment:

	cvsup ports as of 2/4/01, healthd-0.6.4, 4.2-stable as of 2/1/01.

>Description:

--- getMBinfo.c.orig    Mon Feb  5 17:29:58 2001
+++ getMBinfo.c Mon Feb  5 17:18:52 2001
@@ -293,7 +293,7 @@
   else
     *r2 = 1350000 / (n * div2 * FanType2);
   n=ReadByte(0x2A);
-  if (n == 255)
+  if (n == 255 || n == 0)
     *r3 = 0;
   else
     *r3 = 1350000 / (n * div3 * FanType3);

>How-To-Repeat:

MB is SuperMicro PIIIDRE (dual PIII).  healthd run as
  healthd -S -6
with default healthd.conf, coredumps on startup.

Also, I was unable to build the port with make all in
/usr/ports/sysutils/healthd - stopped with

make: don't know how to make real-build. Stop

I had to build it by hand.

>Fix:

See patch under Description.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: jeh 
State-Changed-When: Mon Feb 5 18:46:22 PST 2001 
State-Changed-Why:  
Can't duplicate build problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24884 

From: "James E. Housley" <jeh@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, barney@databus.com
Cc:  
Subject: Re: ports/24884: divide by 0 in healthd
Date: Mon, 05 Feb 2001 21:45:56 -0500

 Divide by zero fixed.
 
 I can't duplicate the build problem however.  My system is also FBSD
 4.2-STABLE of 2/1/01.
 
 Jim
 -- 
 /"\   ASCII Ribbon Campaign  .
 \ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
 / \ -----------------------------------------------------------------
 jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
 jim@TheHousleys.Net  http://www.TheHousleys.net
 ---------------------------------------------------------------------
 Nothing is fool proof, because fools are too ingenious.
 

From: Barney Wolff <barney@databus.com>
To: "James E. Housley" <jeh@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org, barney@databus.com
Subject: Re: ports/24884: divide by 0 in healthd
Date: Mon, 5 Feb 2001 23:49:12 -0500

 Build problem was unrelated to healthd.  Turns out that setting
 WRKDIRPREFIX= /usr/obj
 in /etc/make.conf causes most or all port builds to fail, in
 odd ways.  Setting it to /usr/obj/xyz avoids the problem.
 Thanks!
 Barney
 
 On Mon, Feb 05, 2001 at 09:45:56PM -0500, James E. Housley wrote:
 > Divide by zero fixed.
 > 
 > I can't duplicate the build problem however.  My system is also FBSD
 > 4.2-STABLE of 2/1/01.
 > 
 > Jim
 > -- 
 > /"\   ASCII Ribbon Campaign  .
 > \ / - NO HTML/RTF in e-mail  .
 >  X  - NO Word docs in e-mail .
 > / \ -----------------------------------------------------------------
 > jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
 > jim@TheHousleys.Net  http://www.TheHousleys.net
 > ---------------------------------------------------------------------
 > Nothing is fool proof, because fools are too ingenious.
 
State-Changed-From-To: feedback->closed 
State-Changed-By: jeh 
State-Changed-When: Tue Feb 6 03:00:48 PST 2001 
State-Changed-Why:  
Build problem was unrelated to healthd.  Turns out that setting 
WRKDIRPREFIX= /usr/obj in /etc/make.conf causes most or all port 
builds to fail, in odd ways.  Setting it to /usr/obj/xyz avoids 
the problem. 
Thanks! 
Barney 
-- 
Closed.  Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24884 
>Unformatted:
