Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit 8545269

Browse files
author
Vladimir Ivanov
committed
8268676: assert(!ik->is_interface() && !ik->has_subklass()) failed: inconsistent klass hierarchy
Reviewed-by: kvn, roland, neliasso
1 parent c98d508 commit 8545269

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/hotspot/share/opto/arraycopynode.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,14 @@ Node* ArrayCopyNode::try_clone_instance(PhaseGVN *phase, bool can_reshape, int c
196196

197197
if (!inst_src->klass_is_exact()) {
198198
ciInstanceKlass* ik = inst_src->klass()->as_instance_klass();
199-
assert(!ik->is_interface() && !ik->has_subklass(), "inconsistent klass hierarchy");
200-
phase->C->dependencies()->assert_leaf_type(ik);
199+
assert(!ik->is_interface(), "inconsistent klass hierarchy");
200+
if (ik->has_subklass()) {
201+
// Concurrent class loading.
202+
// Fail fast and return NodeSentinel to indicate that the transform failed.
203+
return NodeSentinel;
204+
} else {
205+
phase->C->dependencies()->assert_leaf_type(ik);
206+
}
201207
}
202208

203209
ciInstanceKlass* ik = inst_src->klass()->as_instance_klass();

0 commit comments

Comments
 (0)