Mercurial > hg > truffle
diff src/os_cpu/linux_x86/vm/os_linux_x86.cpp @ 11029:9ba41a4a71ff
8004124: Handle and/or warn about SI_KERNEL
Summary: Detect this crash in the signal handler and give a fatal error message instead of making us chase down bugs that don't reproduce
Reviewed-by: kvn, mgerdin, dholmes
author | coleenp |
---|---|
date | Fri, 21 Jun 2013 10:50:19 -0400 |
parents | 2cb5d5f6d5e5 |
children | 980532a806a5 5e3b6f79d280 |
line wrap: on
line diff
--- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Thu Jun 20 11:53:51 2013 +0200 +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Fri Jun 21 10:50:19 2013 -0400 @@ -289,6 +289,16 @@ } #endif // AMD64 +#ifndef AMD64 + // Halt if SI_KERNEL before more crashes get misdiagnosed as Java bugs + // This can happen in any running code (currently more frequently in + // interpreter code but has been seen in compiled code) + if (sig == SIGSEGV && info->si_addr == 0 && info->si_code == SI_KERNEL) { + fatal("An irrecoverable SI_KERNEL SIGSEGV has occurred due " + "to unstable signal handling in this distribution."); + } +#endif // AMD64 + // Handle ALL stack overflow variations here if (sig == SIGSEGV) { address addr = (address) info->si_addr;