VM asserts when running with a few JDK value-based classes as ref-default primitive class (attached refval.patch of the JDK change) when building `exploded-image-optimize` target.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/Users/mlchung/ws/valhalla/lworld-dev/src/hotspot/share/opto/node.hpp:439), pid=96197, tid=39683
# assert(i < _cnt) failed: oob: i=3, _cnt=3
#
# JRE version: OpenJDK Runtime Environment (18.0) (fastdebug build 18-internal+0-adhoc.mlchung.lworld-dev)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 18-internal+0-adhoc.mlchung.lworld-dev, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
Current CompileTask:
C2: 1201 506 4 jdk.internal.module.ModulePath$$Lambda$9/0x000000080000cc20::apply (12 bytes)
Stack: [0x00007000019a8000,0x0000700001aa8000], sp=0x0000700001aa39e0, free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x12faecc] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x6dc
V [libjvm.dylib+0x12fb4eb] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x3b
V [libjvm.dylib+0x6471ad] report_vm_error(char const*, int, char const*, char const*, ...)+0xdd
V [libjvm.dylib+0x12d827] Node::set_req(unsigned int, Node*)+0x87
V [libjvm.dylib+0x8f40bc] InlineTypeBaseNode::merge_with(PhaseGVN*, InlineTypeBaseNode const*, int, bool)+0x2ec
V [libjvm.dylib+0x4fe920] PhiNode::Ideal(PhaseGVN*, bool)+0x6b0
V [libjvm.dylib+0xf48711] PhaseIterGVN::transform_old(Node*)+0x131
V [libjvm.dylib+0xf47fd4] PhaseIterGVN::optimize()+0xb4
V [libjvm.dylib+0x5e740c] Compile::Optimize()+0x25c
V [libjvm.dylib+0x5e5afe] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x18ae
V [libjvm.dylib+0x4c5009] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x109
V [libjvm.dylib+0x60688f] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x93f
V [libjvm.dylib+0x605d30] CompileBroker::compiler_thread_loop()+0x2c0
V [libjvm.dylib+0x1249d2c] JavaThread::thread_main_inner()+0x28c
V [libjvm.dylib+0x1249a4d] JavaThread::run()+0x2ad
V [libjvm.dylib+0x1246bc7] Thread::call_run()+0x177
V [libjvm.dylib+0xee48b0] thread_native_entry(Thread*)+0x150
C [libsystem_pthread.dylib+0x6109] _pthread_start+0x94
C [libsystem_pthread.dylib+0x1b8b] thread_start+0xf
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/Users/mlchung/ws/valhalla/lworld-dev/src/hotspot/share/opto/node.hpp:439), pid=96197, tid=39683
# assert(i < _cnt) failed: oob: i=3, _cnt=3
#
# JRE version: OpenJDK Runtime Environment (18.0) (fastdebug build 18-internal+0-adhoc.mlchung.lworld-dev)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 18-internal+0-adhoc.mlchung.lworld-dev, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
Current CompileTask:
C2: 1201 506 4 jdk.internal.module.ModulePath$$Lambda$9/0x000000080000cc20::apply (12 bytes)
Stack: [0x00007000019a8000,0x0000700001aa8000], sp=0x0000700001aa39e0, free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x12faecc] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x6dc
V [libjvm.dylib+0x12fb4eb] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x3b
V [libjvm.dylib+0x6471ad] report_vm_error(char const*, int, char const*, char const*, ...)+0xdd
V [libjvm.dylib+0x12d827] Node::set_req(unsigned int, Node*)+0x87
V [libjvm.dylib+0x8f40bc] InlineTypeBaseNode::merge_with(PhaseGVN*, InlineTypeBaseNode const*, int, bool)+0x2ec
V [libjvm.dylib+0x4fe920] PhiNode::Ideal(PhaseGVN*, bool)+0x6b0
V [libjvm.dylib+0xf48711] PhaseIterGVN::transform_old(Node*)+0x131
V [libjvm.dylib+0xf47fd4] PhaseIterGVN::optimize()+0xb4
V [libjvm.dylib+0x5e740c] Compile::Optimize()+0x25c
V [libjvm.dylib+0x5e5afe] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x18ae
V [libjvm.dylib+0x4c5009] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x109
V [libjvm.dylib+0x60688f] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x93f
V [libjvm.dylib+0x605d30] CompileBroker::compiler_thread_loop()+0x2c0
V [libjvm.dylib+0x1249d2c] JavaThread::thread_main_inner()+0x28c
V [libjvm.dylib+0x1249a4d] JavaThread::run()+0x2ad
V [libjvm.dylib+0x1246bc7] Thread::call_run()+0x177
V [libjvm.dylib+0xee48b0] thread_native_entry(Thread*)+0x150
C [libsystem_pthread.dylib+0x6109] _pthread_start+0x94
C [libsystem_pthread.dylib+0x1b8b] thread_start+0xf
- relates to
-
JDK-8271959 [lworld] Convert Optional and VBS classes to value class
- Resolved
-
JDK-8244231 [lworld] Add support for ref-default and val-default inline classes.
- Resolved