Question about POSIX libgcj signals / exception handling

Mohan Embar gnustuff@thisiscool.com
Sat Mar 11 13:16:00 GMT 2006


Hi Andrew,

>> SIGSEGV gets converted to NullPointerException.  This is unconditional 
>> it happens even if the faulting location is far away from address 
>> zero.      Native code is not treated any differently than the java 
>> code. Any SIGSEGV is converted to NPE.
>
>This is not true for the PPC OS X implementation.  Only null pointer 
>accesses are
>converted to NPEs.
>
>The rest of David's analysis applies, well except for the SIGFPE part 
>for integer math.
>On PPC (and most other targets), function calls are made for divides as 
>the target
>does not raise a trap for undefined code unlike x86.

Thanks for this. I think I'm going to have to roll up my sleeves and start studying
the implementations. I don't think I'm going to be able to wiggle out of
a deeper understanding of what's going on. This will also help me to see
how difficult it would be to solve the Win32 state of affairs:

http://gcc.gnu.org/ml/java/2003-05/msg00237.html

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/






More information about the Java mailing list