JDK-8355574 : Fatal error in abort_verify_int_in_range due to Invalid CastII
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-04-25
  • Updated: 2025-05-17
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
25Unresolved
Related Reports
Causes :  
Sub Tasks
JDK-8355576 :  
Description
compiler/c2/TestVerifyConstraintCasts.java fails

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S120198/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/7d3194d7-b2d3-4fa5-8b6d-8ad17297b490/runs/dcf73a67-117e-4591-831b-52f45460f016/workspace/open/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp:791), pid=826768, tid=826774
#  fatal error: Invalid CastII, idx: 259, val: 33, lo: 0, hi: 32
#
# JRE version: Java(TM) SE Runtime Environment (25.0+21) (fastdebug build 25-ea+21-LTS-2415)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+21-LTS-2415, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x905f10]  abort_verify_int_in_range(unsigned int, int, int, int)+0x20

Stack: [0x00007f7ea1cc5000,0x00007f7ea1dc5000],  sp=0x00007f7ea1dbc760,  free space=989k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x905f10]  abort_verify_int_in_range(unsigned int, int, int, int)+0x20  (c2_MacroAssembler_x86.cpp:791)
J 204 c2 java.util.Arrays.copyOfRange([BII)[B java.base@25-ea (82 bytes) @ 0x00007f7e8c30fe4a [0x00007f7e8c30fd00+0x000000000000014a]
J 254 c2 java.lang.String.<init>(Ljava/lang/AbstractStringBuilder;Ljava/lang/Void;)V java.base@25-ea (98 bytes) @ 0x00007f7e8c316688 [0x00007f7e8c316600+0x0000000000000088]
J 277 c1 jdk.internal.module.ModuleBootstrap.decodeEnableNativeAccess()Ljava/util/Set; java.base@25-ea (130 bytes) @ 0x00007f7e84880054 [0x00007f7e8487fb00+0x0000000000000554]
J 96 c1 jdk.internal.module.ModuleBootstrap.<clinit>()V java.base@25-ea (53 bytes) @ 0x00007f7e8484c38c [0x00007f7e8484be80+0x000000000000050c]
v  ~StubRoutines::call_stub 0x00007f7e8bd5c001
V  [libjvm.so+0x102e344]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4c4  (javaCalls.cpp:415)
V  [libjvm.so+0xfcc17b]  InstanceKlass::call_class_initializer(JavaThread*)+0x3cb  (instanceKlass.cpp:1702)
V  [libjvm.so+0xfd3907]  InstanceKlass::initialize_impl(JavaThread*)+0x9e7  (instanceKlass.cpp:1311)
V  [libjvm.so+0xfd3fce]  InstanceKlass::initialize(JavaThread*)+0x9e  (instanceKlass.cpp:814)
V  [libjvm.so+0x1468c68]  LinkResolver::resolve_static_call(CallInfo&, LinkInfo const&, bool, JavaThread*)+0x98  (linkResolver.cpp:1115)
V  [libjvm.so+0x1468f6b]  LinkResolver::resolve_invokestatic(CallInfo&, constantPoolHandle const&, int, JavaThread*)+0xab  (linkResolver.cpp:1744)
V  [libjvm.so+0x146d0a8]  LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle const&, int, Bytecodes::Code, JavaThread*)+0x108  (linkResolver.cpp:1703)
V  [libjvm.so+0x18d500e]  SharedRuntime::find_callee_info_helper(vframeStream&, Bytecodes::Code&, CallInfo&, JavaThread*)+0x66e  (sharedRuntime.cpp:1267)
V  [libjvm.so+0x18db0fd]  SharedRuntime::resolve_helper(bool, bool, JavaThread*)+0x24d  (sharedRuntime.cpp:1153)
V  [libjvm.so+0x18db81e]  SharedRuntime::resolve_static_call_C(JavaThread*)+0x7e  (sharedRuntime.cpp:1552)
v  ~RuntimeStub::Shared Runtime resolve_static_call_blob 0x00007f7e8be73649
J 94 c1 java.lang.System.initPhase2(ZZ)I java.base@25-ea (27 bytes) @ 0x00007f7e8484bacc [0x00007f7e8484ba80+0x000000000000004c]
v  ~StubRoutines::call_stub 0x00007f7e8bd5c001
V  [libjvm.so+0x102e344]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4c4  (javaCalls.cpp:415)
V  [libjvm.so+0x102f40f]  JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x18f  (javaCalls.cpp:323)
V  [libjvm.so+0x1ab73af]  Threads::create_vm(JavaVMInitArgs*, bool*)+0xb9f  (threads.cpp:322)
V  [libjvm.so+0x116fab4]  JNI_CreateJavaVM+0x54  (jni.cpp:3587)
C  [libjli.so+0x3dff]  JavaMain+0x8f  (java.c:1506)
C  [libjli.so+0x8019]  ThreadJavaMain+0x9  (java_md.c:646)
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25284 Date: 2025-05-17 14:54:43 +0000
17-05-2025

Right, it's an old issue but the assert that captures it was only added with JDK 25. Let's try to fix in JDK 25. We can still defer it later.
14-05-2025

[~thartmann] Since this is an old issue, I think we can tentatively defer to 26, I will try to make a fix this week.
13-05-2025

[~qamai] Since we are getting closer to RDP 1 for JDK 25 (June 05, 2025), any update on this? Thanks!
13-05-2025

ILW = Fatal error in C2 compiled code due to verification failure, single test with diagnostic verification flag (now problem listed), no workaround = MLH = P4
25-04-2025