Re: Floating point in kernel

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Wed May 03 2000 - 12:27:36 EST


> unsigned long foo = some_other_ulong * 1.234;
>
> This code has apparently been working for some time. According to C rules
> of type promotion, "some_other_ulong" should be promoted to a double to
> store the result of the expression, before discarding the fraction and
> assigning to foo.
>
> My question is, what are the likely problems to expect from this when
> running in kernel-space (on x86 w/FPU)?

Random floating point corruption on applications calling it. If its in an
IRQ random FPU corruption for all processes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:12 EST