Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8339386: Assertion on AIX - original PC must be in the main code section of the compiled method #21189

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/hotspot/cpu/ppc/frame_ppc.cpp
Original file line number Diff line number Diff line change
@@ -117,9 +117,9 @@ bool frame::safe_for_sender(JavaThread *thread) {
return false;
}

common_abi* sender_abi = (common_abi*) fp;
volatile common_abi* sender_abi = (common_abi*) fp; // May get updated concurrently by deoptimization!
intptr_t* sender_sp = (intptr_t*) fp;
address sender_pc = (address) sender_abi->lr;;
address sender_pc = (address) sender_abi->lr;

if (Continuation::is_return_barrier_entry(sender_pc)) {
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
@@ -134,9 +134,18 @@ bool frame::safe_for_sender(JavaThread *thread) {
return false;
}

intptr_t* unextended_sender_sp = is_interpreted_frame() ? interpreter_frame_sender_sp() : sender_sp;

// If the sender is a deoptimized nmethod we need to check if the original pc is valid.
nmethod* sender_nm = sender_blob->as_nmethod_or_null();
if (sender_nm != nullptr && sender_nm->is_deopt_pc(sender_pc)) {
address orig_pc = *(address*)((address)unextended_sender_sp + sender_nm->orig_pc_offset());
if (!sender_nm->insts_contains_inclusive(orig_pc)) return false;
}

// It should be safe to construct the sender though it might not be valid.

frame sender(sender_sp, sender_pc, nullptr /* unextended_sp */, nullptr /* fp */, sender_blob);
frame sender(sender_sp, sender_pc, unextended_sender_sp, nullptr /* fp */, sender_blob);

// Do we have a valid fp?
address sender_fp = (address) sender.fp();