C2: assert(is_OuterStripMinedLoop()) failed: invalid node class: IfTrue
Please provide a brief summary of the bug
A fatal error has been detected by the Java Runtime Environment: SIGSEGV (0xb) at pc=0x0000ffff93e58b34, pid=126101, tid=126116 Problematic frame: V [libjvm.so+0xb4ab34] MultiNode::proj_out(unsigned int) const+0x0
--------------- S U M M A R Y ------------
Command Line: -XX:CompileThreshold=100 -Xcomp -XX:-TieredCompilation Test609120.jar
--------------- T H R E A D ---------------
Current thread (0x0000ffff8c1b5ee0): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=126116, stack(0x0000ffff49170000,0x0000ffff4936e000) (2040K)]
Current CompileTask: C2:4769 1980 % !b Test609120::testMethod @ 613 (718 bytes)
Stack: [0x0000ffff49170000,0x0000ffff4936e000], sp=0x0000ffff49368eb0, free space=2019k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0xb4ab34] MultiNode::proj_out(unsigned int) const+0x0 V [libjvm.so+0xa6dc74] PhaseIdealLoop::insert_pre_post_loops(IdealLoopTree*, Node_List&, bool)+0x1c4 V [libjvm.so+0xa6ee80] IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&)+0x56c V [libjvm.so+0xa6f0cc] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x15c V [libjvm.so+0xa6efac] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x3c V [libjvm.so+0xa84f48] PhaseIdealLoop::build_and_optimize()+0xb78 V [libjvm.so+0x59ec14] Compile::Optimize()+0x814 V [libjvm.so+0x5a0118] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0xba8 V [libjvm.so+0x4d1934] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x144 V [libjvm.so+0x5a60f8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb78 V [libjvm.so+0x5a8d18] CompileBroker::compiler_thread_loop()+0x384 V [libjvm.so+0x80bc44] JavaThread::thread_main_inner()+0x184 V [libjvm.so+0xd95e98] Thread::call_run()+0xa8 V [libjvm.so+0xb95f94] thread_native_entry(Thread*)+0xe0 C [libpthread.so.0+0x78bc] start_thread+0x19c
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000010
java -XX:CompileThreshold=100 -Xcomp -XX:-TieredCompilation -jar Test609120.jar
Found revert issue-8314307 testcast pass. jdk21/22/23/24 failed; jdk8/11/17 pass
Did you test with the latest update version?
- [X] Yes
Please provide steps to reproduce where possible
java -XX:CompileThreshold=100 -Xcomp -XX:-TieredCompilation -jar Test609120.jar
Found revert issue-8314307 testcast pass. jdk21/22/23/24 failed; jdk8/11/17 pass
Expected Results
no crash; java -XX:CompileThreshold=100 -Xcomp -XX:-TieredCompilation -jar Test609120.jar Loop count: 0 Loop count: 1 Loop count: 2 Loop count: 3 Loop count: 4 Loop count: 5 Loop count: 6 Loop count: 7 Loop count: 8 Loop count: 9
Actual Results
crash; ref: https://bugs.openjdk.org/browse/JDK-8340532?filter=-2
What Java Version are you using?
openjdk version "23" 2024-09-17 OpenJDK Runtime Environment Temurin-23+37 (build 23+37) OpenJDK 64-Bit Server VM Temurin-23+37 (build 23+37, mixed mode, sharing)
What is your operating system and platform?
aarch64 + X64
How did you install Java?
No response
Did it work before?
No response
Did you test with other Java versions?
No response
Relevant log output
No response
Do you have a reproducer? What is Test609120.jar?
Do you have a reproducer? What is
Test609120.jar? THX @jerboaa ; I have attached a testcase to reproduce this problem. The link is as follows: https://bugs.openjdk.org/browse/JDK-8340532
Reported upstream as https://bugs.openjdk.org/browse/JDK-8340532
We'll consume the fix once/if pushed upstream.
We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. It will be closed soon unless the stale label is removed by a committer, or a new comment is made.
Fixed for upcoming Java 24