8383420: SIGSEGV in PhaseChaitin::gather_lrg_masks

Reviewed-by: dlong, qamai
This commit is contained in:
Vladimir Kozlov 2026-04-30 04:14:41 +00:00
parent 855d591742
commit 0c07aaa7ae
3 changed files with 10 additions and 2 deletions

View File

@ -646,6 +646,12 @@ void CallGenerator::do_late_inline_helper() {
for (uint i1 = 0; i1 < size; i1++) {
map->init_req(i1, call->in(i1));
}
// Call node has in(ReturnAdr) set to top() node.
// We have to set map->in(ReturnAdr) to correct value
// because it is used by uncommon traps.
Node* ret_adr = C->start()->proj_out_or_null(TypeFunc::ReturnAdr);
precond(ret_adr != nullptr);
map->set_req(TypeFunc::ReturnAdr, ret_adr);
// Make sure the state is a MergeMem for parsing.
if (!map->in(TypeFunc::Memory)->is_MergeMem()) {
@ -661,6 +667,7 @@ void CallGenerator::do_late_inline_helper() {
map->set_req(TypeFunc::Parms + i1, top);
}
jvms->set_map(map);
precond(ret_adr == jvms->map()->returnadr());
// Make enough space in the expression stack to transfer
// the incoming arguments and return value.

View File

@ -353,7 +353,8 @@ public:
return _names.at(idx);
}
uint live_range_id(const Node *node) const {
uint live_range_id(const Node* node) const {
precond(node != nullptr);
return _names.at(node->_idx);
}

View File

@ -4145,7 +4145,7 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) {
call->init_req(TypeFunc::Control, head->init_control());
call->init_req(TypeFunc::I_O, C->top()); // Does no I/O.
call->init_req(TypeFunc::Memory, mem_phi->in(LoopNode::EntryControl));
call->init_req(TypeFunc::ReturnAdr, C->start()->proj_out_or_null(TypeFunc::ReturnAdr));
call->init_req(TypeFunc::ReturnAdr, C->top());
Node* frame = new ParmNode(C->start(), TypeFunc::FramePtr);
_igvn.register_new_node_with_optimizer(frame);
call->init_req(TypeFunc::FramePtr, frame);