Assert in PhaseCFG::schedule_late
To reproduce:
Run TestOverunrolling.java with additional flag -XX:+StressReflectiveCode.
With jtreg:
path-to-jtreg/jtreg -va -s -jdk:path-to-jdk/jdk/ -javaoptions:"-XX:+StressReflectiveCode" test/hotspot/jtreg/compiler/loopopts/TestOverunrolling.java
You can find hs_err file in Attachment.
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/gcm.cpp:1423
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/emanuel/Documents/closed-jdk/open/src/hotspot/share/opto/gcm.cpp:1423), pid=268648, tid=268661
# assert(false) failed: graph should be schedulable
#
# JRE version: Java(TM) SE Runtime Environment (19.0) (slowdebug build 19-internal-2022-02-28-1116307.emanuel...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 19-internal-2022-02-28-1116307.emanuel..., compiled mode, compressed oops, compressed class ptrs, parallel gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xadfc8b] PhaseCFG::schedule_late(VectorSet&, Node_Stack&)+0x605
#
Current CompileTask:
C2: 32296 3423 b compiler.loopopts.TestOverunrolling::test3 (89 bytes)
Stack: [0x00007f3c5d0c6000,0x00007f3c5d1c7000], sp=0x00007f3c5d1c1960, free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xadfc8b] PhaseCFG::schedule_late(VectorSet&, Node_Stack&)+0x605
V [libjvm.so+0xae00cd] PhaseCFG::global_code_motion()+0x1f3
V [libjvm.so+0xae08da] PhaseCFG::do_global_code_motion()+0x60
V [libjvm.so+0x85c3ea] Compile::Code_Gen()+0x1c6
V [libjvm.so+0x85324d] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1567
V [libjvm.so+0x748299] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x185
V [libjvm.so+0x87088d] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x899
V [libjvm.so+0x86f4e7] CompileBroker::compiler_thread_loop()+0x3df
V [libjvm.so+0x88fc3b] CompilerThread::thread_entry(JavaThread*, JavaThread*)+0x69
V [libjvm.so+0x124901f] JavaThread::thread_main_inner()+0x15d
V [libjvm.so+0x1248ebf] JavaThread::run()+0x167
V [libjvm.so+0x12467d0] Thread::call_run()+0x180
V [libjvm.so+0x105262b] thread_native_entry(Thread*)+0x18f