Skip to content

Commit fbc194a

Browse files
committed
8299658: C1 compilation crashes in LinearScan::resolve_exception_edge
Backport-of: cf2d33ca2ee08c61596ab10b7602500a6931fa31
1 parent b86a0ce commit fbc194a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/hotspot/share/c1/c1_LinearScan.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,6 +1949,14 @@ void LinearScan::resolve_exception_edge(XHandler* handler, int throwing_op_id, i
19491949
// interval at the throwing instruction must be searched using the operands
19501950
// of the phi function
19511951
Value from_value = phi->operand_at(handler->phi_operand());
1952+
if (from_value == nullptr) {
1953+
// We have reached here in a kotlin application running with JVMTI
1954+
// capability "can_access_local_variables".
1955+
// The illegal state is not yet propagated to this phi. Do it here.
1956+
phi->make_illegal();
1957+
// We can skip the illegal phi edge.
1958+
return;
1959+
}
19521960

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

0 commit comments

Comments
 (0)