JDK-8349032 : C2: Parse Predicate refactoring in Loop Unswitching broke fix for JDK-8290850
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-01-30
  • Updated: 2025-03-07
  • Resolved: 2025-02-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 b12Fixed
Related Reports
Causes :  
Relates :  
Description
The attached Java Fuzzer test starts to fail after JDK-8344035:

$ java -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test.java
$ java -XX:CompileCommand=compileonly,*Reduced*::* -Xcomp Reduced.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (c:\sb\prod\1738051592\workspace\open\src\hotspot\share\opto\loopnode.cpp:6501), pid=58544, tid=80648
#  assert(false) failed: Bad graph detected in build_loop_late
#
# JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-internal-LTS-2025-01-28-0758193.axel.boldt-christmas.zgc)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-internal-LTS-2025-01-28-0758193.axel.boldt-christmas.zgc, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0xbc4be8]  PhaseIdealLoop::build_loop_late_post_work+0x918
............
Command Line: -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\23\37\bundles\windows-x64\jdk-23_windows-x64_bin.zip\jdk-23 -Djava.io.tmpdir=c:\sb\prod\1738074992\testoutput\test-support\jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_BigTest_java\tmp -XX:+CreateCoredumpOnCrash Test
...........
C2:2514   48   !b  4       Test::mainTest (680 bytes)

Stack: [0x000000bad7200000,0x000000bad7300000],  sp=0x000000bad72fba00,  free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xbc4be8]  PhaseIdealLoop::build_loop_late_post_work+0x918  (loopnode.cpp:6501)
V  [jvm.dll+0xbc4134]  PhaseIdealLoop::build_loop_late+0x314  (loopnode.cpp:6314)
V  [jvm.dll+0xbc298c]  PhaseIdealLoop::build_and_optimize+0x88c  (loopnode.cpp:4779)
V  [jvm.dll+0x558fcc]  Compile::Optimize+0xb6c  (compile.cpp:2429)
V  [jvm.dll+0x556183]  Compile::Compile+0x11a3  (compile.cpp:852)
V  [jvm.dll+0x45d059]  C2Compiler::compile_method+0x179  (c2compiler.cpp:144)
V  [jvm.dll+0x5741ca]  CompileBroker::invoke_compiler_on_method+0x7aa  (compileBroker.cpp:2318)
V  [jvm.dll+0x5717cb]  CompileBroker::compiler_thread_loop+0x33b  (compileBroker.cpp:1977)
V  [jvm.dll+0x8baa12]  JavaThread::thread_main_inner+0x282  (javaThread.cpp:777)
V  [jvm.dll+0xfa7144]  Thread::call_run+0x1b4  (thread.cpp:236)
V  [jvm.dll+0xd6a261]  thread_native_entry+0xe1  (os_windows.cpp:566)
C  [ucrtbase.dll+0x26b4c]  (no source info available)
C  [KERNEL32.DLL+0x14cb0]  (no source info available)
C  [ntdll.dll+0x7ecdb]  (no source info available)
Comments
Changeset: a5c9a4db Branch: master Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2025-02-24 07:28:05 +0000 URL: https://git.openjdk.org/jdk/commit/a5c9a4dbde410c687f05951b8f1d3cf72fcaedc0
24-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23712 Date: 2025-02-20 12:18:57 +0000
20-02-2025

ILW = Bad graph assert, single fuzzer test, disable compilation of affected method = HLM = P3
30-01-2025