This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Fix signal handlers under indirect-dispatch on MIPS
- From: Andrew Haley <aph at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Thu, 20 Jul 2006 14:05:19 +0100
- Subject: Re: Patch: Fix signal handlers under indirect-dispatch on MIPS
- References: <44BEB1BB.2070105@avtrex.com>
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.