Subject: Re: pkg/27404: nut core dumps when "viewing foods"
To: None <port-alpha@netbsd.org>
From: None <othyro@freeshell.org>
List: port-alpha
Date: 12/30/2004 17:42:00
On Sun, Dec 26, 2004 at 10:36:58AM -0800, Jim Jozwiak wrote:
> Hello, Just looking at the data, I notice this particular pizza has "no 
> data" for fiber on the line it is about to print, which suggests that on 
> the NetBSD/alpha platform, a machine that I have no access to, there is 
> a difference in how the module is handling negative zero.  The test for 
> negative zero function is at the end of the file "util.c" and the call 
> whch is failing is line 708 of the file "food.c".  Previous calls to the 
> test_for_negative_zero function which did not find a negative zero were 
> obviously successful, because the previous line printed values for 
> calories, total carb, and protein.  This suggests that if the function 
> does find a negative zero, it either fails in the process, or line 708 
> of "food.c" fails when the test_for_negative_zero function returns 1.  
> So, on the NetBSD/alpha platform perhaps one of the following statements 
> do not evaluate properly when *value is -0?
>  
>     if (*value != 0) return 0;
>     if ( 1.0 / *value >= 0 ) return 0;
> 
> Perhaps there should be a cast on the boolean which is the divisor to 
> the float:
> 
>     if ( 1.0 / (float) *value >= 0 ) return 0;
>     
> I would be happy to help further if there is anything I can do, and if 
> anyone who knows the NetBSD/alpha platform has any insight into how the 
> function should go, I would be happy to incorporate the change into my 
> next distribution of NUT and add a NetBSD/alpha README explaining how to 
> compile the program on that platform.
> 
> Sincerely,
> 
> Jim Jozwiak
> 
> >On Sun, Dec 26, 2004 at 03:12:10PM +0000, wiz@netbsd.org wrote:
> > 
> >
> >>Synopsis: nut core dumps when "viewing foods"
> >>
> >>State-Changed-From-To: open->feedback
> >>State-Changed-By: wiz@netbsd.org
> >>State-Changed-When: Sun, 26 Dec 2004 15:12:10 +0000
> >>State-Changed-Why:
> >>I just updated the package to 10.13.
> >>I can't reproduce the problem on i386 in 10.2 nor in 10.13;
> >>if it still persists, please contact the author of the program,
> >>and let me know if he comes up with a patch.
> >>   
> >>
> >
> >http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=27404
> >

!tr