On Fri, 27 May 2005, Otto Moerbeek wrote:

> > Ik can reproduce this on my G3 iBook, but not on my Mac mini. 
> > 
> > It turns out that x becomes suddenly 0 after some iterations of this loop:
> > 
> >                 for (i = 1; i <= reps || infinity; i++) {
> >                         double v;
> >                         y = arc4random() / ((double)0xffffffff + 1);
> >                         v = y * x + begin;
> >                         if (putdata(v, reps == i && !infinity))
> >                                 errx(1, "range error in conversion: %f", 
> > v); 
> >                 }
> > 
> > Making x a global var makes the problem disappear. My guess is that we are 
> > looking at either a code generation problem or a fp context save/restore 
> > problem.
> > 
> > Will dig into this a bit deeper later.

Well, after some really deep digging, this commit by Dale Rahn fixes
the problem. 

http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/powerpc/powerpc/trap.c.diff?r1=1.67&r2=1.68&f=h

Thanks for the report.

        -Otto

Reply via email to