[Full-disclosure] Firefox 2.0.0.7 has a very serious calculation bug

Jimby Sharp jimbysharp at gmail.com
Fri Sep 28 20:48:16 BST 2007


Thanks.

On 9/29/07, Michal Zalewski <lcamtuf at dione.cc> wrote:
> On Sat, 29 Sep 2007, Jimby Sharp wrote:
>
> > I don't get the same from C-style double arithmetics. Could you provide
> > a sample code that you believe should show the same behavior?
>
> If you don't, it's presumably because the subtraction is optimized out by
> the compiler, or because you printf() with an insufficient precision in
> format spec. The following should do the trick:
>
> volatile double a = 5.2;
> volatile double b = 0.1;
> main() { printf("%.16lf\n",a-b); }
>
> /mz
>




Full-Disclosure is hosted and sponsored by Secunia.