< prev index next >
src/os/posix/vm/vmError_posix.cpp
Print this page
rev 12777 : 8176872: [s390] wrong pc shown in error logs
Reviewed-by:
@@ -113,11 +113,16 @@
}
os::Posix::unblock_thread_signal_mask(&newset);
// support safefetch faults in error handling
ucontext_t* const uc = (ucontext_t*) ucVoid;
- address const pc = uc ? os::Posix::ucontext_get_pc(uc) : NULL;
+ address pc = uc ? os::Posix::ucontext_get_pc(uc) : NULL;
+
+ // Correct pc for SIGILL, SIGFPE (see JDK-8176872)
+ if (sig == SIGILL || sig == SIGFPE) {
+ pc = (address)info->si_addr;
+ }
if (uc && pc && StubRoutines::is_safefetch_fault(pc)) {
os::Posix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
return;
}
< prev index next >