We hit the following asserts in C2 when migrating wrapper classes like java.lang.Integer to value classes:
# Internal Error (/valhalla/open/src/hotspot/share/opto/inlinetypenode.cpp:757), pid=3021298, tid=3021986
# assert(!null_free || vt->as_InlineType()->is_default(&gvn) || init_ctl != kit->control() || !gvn.type(oop)->is_inlinetypeptr() || oop->is_Con() || oop->Opcode() == Op_InlineTypePtr || AllocateNode::Ideal_allocation(oop, &gvn) != __null || vt->as_InlineType()->is_loaded(&gvn) == oop) failed: inline type should be loaded
#
# JRE version: Java(TM) SE Runtime Environment (19.0) (fastdebug build 19-lworld3ea-2022-03-30-1508533.fred...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-lworld3ea-2022-03-30-1508533.fred..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xf5f4da] InlineTypeNode::make_from_oop(GraphKit*, Node*, ciInlineKlass*, bool)+0x9aa
narrowoop: java/lang/Integer:NotNull:exact *[int:256]:exact *
k: <ciObjArrayKlass name=[Ljava/lang/Integer; ident=1291 address=0x00007fb214024c98>
ck: <ciFlatArrayKlass name=[Qjava/lang/Integer; ident=1294 address=0x00007fb214025880>
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/type.hpp:1367
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/oracle/valhalla/open/src/hotspot/share/opto/type.hpp:1367), pid=545168, tid=545176
# assert(false) failed: unexpected TypeAryPtr::_klass
#
# Internal Error (/valhalla/open/src/hotspot/share/opto/inlinetypenode.cpp:757), pid=3021298, tid=3021986
# assert(!null_free || vt->as_InlineType()->is_default(&gvn) || init_ctl != kit->control() || !gvn.type(oop)->is_inlinetypeptr() || oop->is_Con() || oop->Opcode() == Op_InlineTypePtr || AllocateNode::Ideal_allocation(oop, &gvn) != __null || vt->as_InlineType()->is_loaded(&gvn) == oop) failed: inline type should be loaded
#
# JRE version: Java(TM) SE Runtime Environment (19.0) (fastdebug build 19-lworld3ea-2022-03-30-1508533.fred...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-lworld3ea-2022-03-30-1508533.fred..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xf5f4da] InlineTypeNode::make_from_oop(GraphKit*, Node*, ciInlineKlass*, bool)+0x9aa
narrowoop: java/lang/Integer:NotNull:exact *[int:256]:exact *
k: <ciObjArrayKlass name=[Ljava/lang/Integer; ident=1291 address=0x00007fb214024c98>
ck: <ciFlatArrayKlass name=[Qjava/lang/Integer; ident=1294 address=0x00007fb214025880>
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/type.hpp:1367
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/oracle/valhalla/open/src/hotspot/share/opto/type.hpp:1367), pid=545168, tid=545176
# assert(false) failed: unexpected TypeAryPtr::_klass
#
- relates to
-
JDK-8284164 [lworld] Inline type elements of autobox cache should be casted to non-null
-
- Resolved
-