# HG changeset patch # User dcubed # Date 1371837326 25200 # Node ID b7bc7c94b4b55ce8fff275d0c8db80b7bf98ede9 # Parent bed34a7a3b9b3ab589e3cc11bef2bc2b3ec362b0# Parent bb6c7f2f10fdf01f672c32e7684a7f9540174a8f Merge diff -r bb6c7f2f10fd -r b7bc7c94b4b5 src/os_cpu/linux_x86/vm/os_linux_x86.cpp --- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Fri Jun 21 08:18:08 2013 -0700 +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Fri Jun 21 10:55:26 2013 -0700 @@ -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; diff -r bb6c7f2f10fd -r b7bc7c94b4b5 src/share/vm/runtime/frame.cpp --- a/src/share/vm/runtime/frame.cpp Fri Jun 21 08:18:08 2013 -0700 +++ b/src/share/vm/runtime/frame.cpp Fri Jun 21 10:55:26 2013 -0700 @@ -713,7 +713,8 @@ Method* m = ((nmethod *)_cb)->method(); if (m != NULL) { m->name_and_sig_as_C_string(buf, buflen); - st->print("J %s", buf); + st->print("J %s @ " PTR_FORMAT " [" PTR_FORMAT "+" SIZE_FORMAT "]", + buf, _pc, _cb->code_begin(), _pc - _cb->code_begin()); } else { st->print("J " PTR_FORMAT, pc()); } diff -r bb6c7f2f10fd -r b7bc7c94b4b5 src/share/vm/runtime/sharedRuntime.cpp --- a/src/share/vm/runtime/sharedRuntime.cpp Fri Jun 21 08:18:08 2013 -0700 +++ b/src/share/vm/runtime/sharedRuntime.cpp Fri Jun 21 10:55:26 2013 -0700 @@ -813,8 +813,11 @@ // 3. Implict null exception in nmethod if (!cb->is_nmethod()) { - guarantee(cb->is_adapter_blob() || cb->is_method_handles_adapter_blob(), - "exception happened outside interpreter, nmethods and vtable stubs (1)"); + bool is_in_blob = cb->is_adapter_blob() || cb->is_method_handles_adapter_blob(); + if (!is_in_blob) { + cb->print(); + fatal(err_msg("exception happened outside interpreter, nmethods and vtable stubs at pc " INTPTR_FORMAT, pc)); + } Events::log_exception(thread, "NullPointerException in code blob at " INTPTR_FORMAT, pc); // There is no handler here, so we will simply unwind. return StubRoutines::throw_NullPointerException_at_call_entry();