#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/wanghuang/repo/panama-vector/src/hotspot/share/opto/compile.cpp:4220), pid=115478, tid=115678
# Error: ShouldNotReachHere()
#
# Problematic frame:
# V [libjvm.so+0x821324] Compile::print_inlining_move_to(CallGenerator*)+0xb0
#
# Core dump will be written. Default location: /home/wanghuang/bug/core.%e.115478.%t
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
--------------- S U M M A R Y ------------
Command Line: --add-modules=jdk.incubator.vector -Xcomp -XX:CompileCommand=compileonly,TestVectorPrintInline::* -XX:+PrintOptoInlining TestVectorPrintInline
--------------- T H R E A D ---------------
Current thread (0x0000ffff884f1f10): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=115678, stack(0x0000ffff1ae00000,0x0000ffff1b000000)]
Current CompileTask:
C2: 2437 35 b 4 TestVectorPrintInline::main (20 bytes)
Stack: [0x0000ffff1ae00000,0x0000ffff1b000000], sp=0x0000ffff1affab30, free space=2026k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x821324] Compile::print_inlining_move_to(CallGenerator*)+0xb0
V [libjvm.so+0x702134] LateInlineVirtualCallGenerator::do_late_inline()+0x634
V [libjvm.so+0x818fc8] Compile::inline_incrementally_one()+0x19c
V [libjvm.so+0x819488] Compile::inline_incrementally(PhaseIterGVN&)+0x194
V [libjvm.so+0x819ad8] Compile::Optimize()+0x174
V [libjvm.so+0x8140ec] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0xebc
V [libjvm.so+0x6fe0ac] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x10c
V [libjvm.so+0x82ffe0] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x788
V [libjvm.so+0x82ed9c] CompileBroker::compiler_thread_loop()+0x378
V [libjvm.so+0x12d4934] compiler_thread_entry(JavaThread*, Thread*)+0x84
V [libjvm.so+0x12d07a4] JavaThread::thread_main_inner()+0x178
V [libjvm.so+0x12d0618] JavaThread::run()+0x19c
V [libjvm.so+0x12cc7b8] Thread::call_run()+0x19c
V [libjvm.so+0x1024670] thread_native_entry(Thread*)+0x1e4
C [libpthread.so.0+0x78bc] start_thread+0x19c
The reason is we use
```
virtual JVMState* generate(JVMState* jvms) {
Compile* C = Compile::current();
// Emit the CallDynamicJava and request separate projections so
// that the late inlining logic can distinguish between fall
// through and exceptional uses of the memory and io projections
// as is done for allocations and macro expansion.
JVMState* new_jvms = VirtualCallGenerator::generate(jvms);
if (call_node() != NULL) {
call_node()->set_generator(this);
}
return new_jvms;
}
```
we use `VirtualCallGenerator::generate` which calls `print_inlining_update ` to update print_inlining list. However, `virtual _late_inline` case is missing. When we call `Compile::print_inlining_move_to` in `LateInlineVirtualCallGenerator::do_late_inline()`, we can not find a LateInlineVirtualCallGenerator in `_print_inlining_list`.
We can fix this bug with adding this line in the constructor of `LateInlineVirtualCallGenerator`:
+ virtual bool is_late_inline() const { return true; }