Patch: Fix signal handlers under indirect-dispatch on MIPS
Andrew Haley
aph@redhat.com
Thu Jul 20 13:05:00 GMT 2006
David Daney writes:
> For some (as yet unknown) reason on MIPS with -findirect-dispatch, the
> SIGSEGV and SIGFPE signal handlers were not being installed properly.
> This caused the failure of any test case that triggered an
> ArithmeticException or NullPointerException via the signal handling
> mechanism.
Perhaps the shape of your struct kernel_sigaction was wrong.
> The fix is to call libc's sigaction function instead of trying to trick
> libc by doing a direct system call to the kernel. Since the MIPS port
> does not need to patch-up and restart any faulting divide instructions,
> the syscall trick is not needed. This has the added benefit of slightly
> simplifying the code.
>
> I guess it is not nice to trick glibc...
The other reason I did this with a direct syscall rather than a libc
call was that libc didn't used to be compiled with unwind information,
so it wasn't possible to unwind through its handlers.
Andrew.
More information about the Java-patches
mailing list