Skip to content

Commit

Permalink
8299658: C1 compilation crashes in LinearScan::resolve_exception_edge
Browse files Browse the repository at this point in the history
Backport-of: cf2d33ca2ee08c61596ab10b7602500a6931fa31
  • Loading branch information
TheRealMDoerr committed Sep 4, 2023
1 parent b86a0ce commit fbc194a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hotspot/share/c1/c1_LinearScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1949,6 +1949,14 @@ void LinearScan::resolve_exception_edge(XHandler* handler, int throwing_op_id, i
// interval at the throwing instruction must be searched using the operands
// of the phi function
Value from_value = phi->operand_at(handler->phi_operand());
if (from_value == nullptr) {
// We have reached here in a kotlin application running with JVMTI
// capability "can_access_local_variables".
// The illegal state is not yet propagated to this phi. Do it here.
phi->make_illegal();
// We can skip the illegal phi edge.
return;
}

// with phi functions it can happen that the same from_value is used in
// multiple mappings, so notify move-resolver that this is allowed
Expand Down

1 comment on commit fbc194a

@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.