Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8256986: [PPC64] C2 crashes when accessing nonexisting jvms of CallLe…
…afDirectNode

Reviewed-by: clanger
  • Loading branch information
TheRealMDoerr committed Nov 27, 2020
1 parent 644271e commit d51e2ab
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/hotspot/cpu/ppc/ppc.ad
Expand Up @@ -1115,11 +1115,17 @@ int MachCallDynamicJavaNode::ret_addr_offset() {
}

int MachCallRuntimeNode::ret_addr_offset() {
if (rule() == CallRuntimeDirect_rule) {
// CallRuntimeDirectNode uses call_c.
#if defined(ABI_ELFv2)
return 28;
return 28;
#else
return 40;
return 40;
#endif
}
assert(rule() == CallLeafDirect_rule, "unexpected node with rule %u", rule());
// CallLeafDirectNode uses bl.
return 4;
}

int MachCallNativeNode::ret_addr_offset() {
Expand Down Expand Up @@ -3578,6 +3584,7 @@ encode %{
call->_tf = _tf;
call->_entry_point = _entry_point;
call->_cnt = _cnt;
call->_guaranteed_safepoint = true;
call->_oop_map = _oop_map;
call->_jvms = _jvms;
call->_jvmadj = _jvmadj;
Expand Down Expand Up @@ -3778,14 +3785,14 @@ encode %{
call->_tf = _tf;
call->_entry_point = _entry_point;
call->_cnt = _cnt;
call->_guaranteed_safepoint = false;
call->_oop_map = _oop_map;
guarantee(!_jvms, "You must clone the jvms and adapt the offsets by fix_jvms().");
call->_jvms = NULL;
call->_jvmadj = _jvmadj;
call->_in_rms = _in_rms;
call->_nesting = _nesting;


// New call needs all inputs of old call.
// Req...
for (uint i = 0; i < req(); ++i) {
Expand Down

1 comment on commit d51e2ab

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.