Subject: Re: Missing some floating point function?
To: None <kilbi@rad.rwth-aachen.de>
From: Christos Zoulas <christos@zoulas.com>
List: port-cobalt
Date: 10/18/2004 15:51:37
On Oct 18, 9:43pm, kilbi@rad.rwth-aachen.de (Markus W Kilbinger) wrote:
-- Subject: Re: Missing some floating point function?
| Zoulas> Looks like a NULL pointer (NULL+0x4) dereference bug.
|
| (What does it mean?)
|
| I've extracted perl's Configure C source fragment and recompiled it
| explicitly: It's really and only the cast:
|
| int i32;
| double f, g;
| [...]
| i32 = (int) g;
|
| depending (I didn't write that last time) on the mips specific
| compilation optimization: Binaries compiled with anything like
| '-mips2' or higher seem to produce the panic:
|
| gcc -O -s -mips2 -o test-casti32 test-casti32.c
|
| while plain (or '-mips1') binaries seem to run fine.
|
| Is this a (known) limitation of cobalt/mips port/libs?
| A bug in gcc?
|
| Anyway, a kernel panic for this kind of user 'stupidity' is not very
| kind... ;-)
|
No, this is a kernel bug. The kernel traps the floating point operation
and then has a bug handling it. The null pointer bug is in the kernel.
With mips1, probably the compiler does not generate floating point code
and does the equivalent of soft-float so that the buggy code does not get
invoked.
christos