[kaffe] About ARM JIT's Exception Handling in Kaffe

Dalibor Topic robilad at kaffe.org
Wed Oct 20 09:46:26 PDT 2004


Bytecode wrote:
> I'm porting Kaffe to an ARM-like processor. Now JIT works OK.  I find an
> error in JIT for ARM in my porting work.

Hi,

thanks for your bug report & the endurance to find the problem.

> But if we use GCC's O2 option to compile Kaffe, GCC will optimize the
> prologue of the two functions (throwExternalException and buildStackTrace)
> and thus destroy the stack trace structure. You can use GCC -O2 -S to
> compile some programs and find that FP register disappears in the prologue
> of the function.
> (I trace the error for several days.  I am cracy:). Finally I disassembled
> the libkaffe.so and read the assemble code of the two functions. I find the
> bug!)
> 
> So we must not use O2 option to compile exception.c and stackTrace.c. 
> 
> Any suggestion is welcome.

ouch. Some kaffe ports ports explicitely pass -fno-omit-frame-pointer to 
gcc in config.frag. I've created such a patch for arm-linux. Could you 
give it a try to see if that fixes the problem of the missing fp for you?

cheers,
dalibor topic
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: arm-config.frag
Url: http://kaffe.org/pipermail/kaffe/attachments/20041020/cb27ae21/attachment-0002.txt 


More information about the kaffe mailing list