Patch: Fix signal handlers under indirect-dispatch on MIPS
David Daney
ddaney@avtrex.com
Wed Jul 19 22:27:00 GMT 2006
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.
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...
These are the test cases that this patch fixes:
Array_3
Divide_1
Invoke_1
StackTrace2
Throw_2
pr83
Regression tested on mipsel-linux with no new failures.
OK to commit?
2006-07-19 David Daney <ddaney@avtrex.com)
* include/mips-signal.h: Update copyright.
(struct kernel_sigaction): Removed.
(SIGNAL_HANDLER): Changed prototype.
(MAKE_THROW_FRAME): Added cast.
(INIT_SEGV): Use sigaction instead of syscall.
(INIT_FPE): Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mips-signal.d
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20060719/7c6f9265/attachment.ksh>
More information about the Java-patches
mailing list