Subject: Re: Missing some floating point function?
To: Christos Zoulas <christos@zoulas.com>
From: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
List: port-cobalt
Date: 10/18/2004 21:43:36
Hi again!
>I just tried to compile perl58 via pkgsrc on my qube 2 (running
>-current kernel and userland):
>[...]
> Checking whether your C compiler can cast large floats to int32.
>This last test panics the kernel reproduceablely:
>
> trap: TLB miss (load or instr. fetch) in kernel mode
> status=0x20007c03, cause=0x8, epc=0x8019514c, vaddr=0x4
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... ;-)
Sorry for my initially unprecise report,
Markus.