< prev index next >
src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp
Print this page
rev 7970 : 8074552: SafeFetch32 and SafeFetchN do not work in error handling
Summary: handle SafeFetch faults in secondary signal handlers
Reviewed-by: dholmes
Contributed-by: Thomas Stuefe
*** 395,405 ****
if (nm != NULL && nm->has_unsafe_access()) {
// We don't really need a stub here! Just set the pending exeption and
// continue at the next instruction after the faulting read. Returning
// garbage from this read is ok.
thread->set_pending_unsafe_access_error();
! uc->uc_mcontext.jmp_context.iar = ((unsigned long)pc) + 4;
return 1;
}
}
}
--- 395,405 ----
if (nm != NULL && nm->has_unsafe_access()) {
// We don't really need a stub here! Just set the pending exeption and
// continue at the next instruction after the faulting read. Returning
// garbage from this read is ok.
thread->set_pending_unsafe_access_error();
! os::Aix::ucontext_set_pc(uc, pc + 4);
return 1;
}
}
}
*** 418,428 ****
sig == SIGBUS && thread->doing_unsafe_access()) {
// We don't really need a stub here! Just set the pending exeption and
// continue at the next instruction after the faulting read. Returning
// garbage from this read is ok.
thread->set_pending_unsafe_access_error();
! uc->uc_mcontext.jmp_context.iar = ((unsigned long)pc) + 4;
return 1;
}
}
// Check to see if we caught the safepoint code in the
--- 418,428 ----
sig == SIGBUS && thread->doing_unsafe_access()) {
// We don't really need a stub here! Just set the pending exeption and
// continue at the next instruction after the faulting read. Returning
// garbage from this read is ok.
thread->set_pending_unsafe_access_error();
! os::Aix::ucontext_set_pc(uc, pc + 4);
return 1;
}
}
// Check to see if we caught the safepoint code in the
*** 443,453 ****
// One of the above code blocks ininitalized the stub, so we want to
// delegate control to that stub.
if (stub != NULL) {
// Save all thread context in case we need to restore it.
if (thread != NULL) thread->set_saved_exception_pc(pc);
! uc->uc_mcontext.jmp_context.iar = (unsigned long)stub;
return 1;
}
run_chained_handler:
--- 443,453 ----
// One of the above code blocks ininitalized the stub, so we want to
// delegate control to that stub.
if (stub != NULL) {
// Save all thread context in case we need to restore it.
if (thread != NULL) thread->set_saved_exception_pc(pc);
! os::Aix::ucontext_set_pc(uc, stub);
return 1;
}
run_chained_handler:
< prev index next >