--- old/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2017-12-28 18:15:48.637777000 +0100 +++ new/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2017-12-28 18:15:48.426774000 +0100 @@ -46,6 +46,7 @@ #include "runtime/javaCalls.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/osThread.hpp" +#include "runtime/safepointMechanism.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" @@ -382,7 +383,7 @@ stub = SharedRuntime::get_handle_wrong_method_stub(); } - else if (sig == SIGSEGV && + else if (sig == ((SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY) ? SIGTRAP : SIGSEGV) && // A linux-ppc64 kernel before 2.6.6 doesn't set si_addr on some segfaults // in 64bit mode (cf. http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.6), // especially when we try to read from the safepoint polling page. So the check @@ -393,7 +394,8 @@ ((cb = CodeCache::find_blob(pc)) != NULL) && cb->is_compiled()) { if (TraceTraps) { - tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc)); + tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (%s)", p2i(pc), + (SafepointMechanism::uses_thread_local_poll() && USE_POLL_BIT_ONLY) ? "SIGTRAP" : "SIGSEGV"); } stub = SharedRuntime::get_poll_stub(pc); }