(gdb) ssl
Detaching from program: /home/jatinbha/sandboxes/lworld/build/linux-x86_64-server-slowdebug/images/jdk/bin/java, process 2607242
[Inferior 1 (process 2607242) detached]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/jatinbha/sandboxes/lworld/src/hotspot/share/opto/graphKit.cpp:3553), pid=2607242, tid=2607271
# assert(stopped() || !toop->is_inlinetypeptr() || obj->is_InlineType()) failed: should have been scalarized
#
# JRE version: OpenJDK Runtime Environment (25.0) (slowdebug build 25-internal-adhoc.root.lworld)
# Java VM: OpenJDK 64-Bit Server VM (slowdebug 25-internal-adhoc.root.lworld, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x112834b] GraphKit::gen_checkcast(Node*, Node*, Node**, bool)+0x483
Test case:-
import jdk.internal.misc.*;
value abstract class MyAbsValue {
}
value class MyValue extends MyAbsValue {
public float field1;
public float field2;
public float field3;
public float field4;
public MyValue(float f1, float f2, float f3, float f4) {
this.field1 = f1;
this.field2 = f2;
this.field3 = f3;
this.field4 = f4;
}
public float getAccum() {
return this.field1 + this.field2 + this.field3 + this.field4;
}
}
public class test_osr_flow {
public static Unsafe UNSAFE = Unsafe.getUnsafe();
public static float micro(MyAbsValue obj) {
obj = UNSAFE.makePrivateBuffer(obj);
float res = 0.0f;
for (int i = 0; i < 100000; i++) {
res += UNSAFE.getFloat(obj, 12 + ((i * Float.BYTES) & 15));
UNSAFE.putFloat(obj, 12 + ((i * Float.BYTES) & 15), res);
}
obj = UNSAFE.finishPrivateBuffer(obj);
return res;
}
public static void main(String [] args) {
MyAbsValue obj = new MyValue(10.0f, 20.0f, 30.0f, 40.0f);
System.out.println("[res] " + micro(obj));
}
}
Comand Line:
java --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED -XX:-TieredCompilation -Xbatch -XX:+TraceTypeProfile -XX:CompileCommand=compileonly,test_osr_flow::micro --enable-preview -cp . test_osr_flow
Detaching from program: /home/jatinbha/sandboxes/lworld/build/linux-x86_64-server-slowdebug/images/jdk/bin/java, process 2607242
[Inferior 1 (process 2607242) detached]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/jatinbha/sandboxes/lworld/src/hotspot/share/opto/graphKit.cpp:3553), pid=2607242, tid=2607271
# assert(stopped() || !toop->is_inlinetypeptr() || obj->is_InlineType()) failed: should have been scalarized
#
# JRE version: OpenJDK Runtime Environment (25.0) (slowdebug build 25-internal-adhoc.root.lworld)
# Java VM: OpenJDK 64-Bit Server VM (slowdebug 25-internal-adhoc.root.lworld, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x112834b] GraphKit::gen_checkcast(Node*, Node*, Node**, bool)+0x483
Test case:-
import jdk.internal.misc.*;
value abstract class MyAbsValue {
}
value class MyValue extends MyAbsValue {
public float field1;
public float field2;
public float field3;
public float field4;
public MyValue(float f1, float f2, float f3, float f4) {
this.field1 = f1;
this.field2 = f2;
this.field3 = f3;
this.field4 = f4;
}
public float getAccum() {
return this.field1 + this.field2 + this.field3 + this.field4;
}
}
public class test_osr_flow {
public static Unsafe UNSAFE = Unsafe.getUnsafe();
public static float micro(MyAbsValue obj) {
obj = UNSAFE.makePrivateBuffer(obj);
float res = 0.0f;
for (int i = 0; i < 100000; i++) {
res += UNSAFE.getFloat(obj, 12 + ((i * Float.BYTES) & 15));
UNSAFE.putFloat(obj, 12 + ((i * Float.BYTES) & 15), res);
}
obj = UNSAFE.finishPrivateBuffer(obj);
return res;
}
public static void main(String [] args) {
MyAbsValue obj = new MyValue(10.0f, 20.0f, 30.0f, 40.0f);
System.out.println("[res] " + micro(obj));
}
}
Comand Line:
java --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED -XX:-TieredCompilation -Xbatch -XX:+TraceTypeProfile -XX:CompileCommand=compileonly,test_osr_flow::micro --enable-preview -cp . test_osr_flow
- relates to
-
JDK-8352647 [lworld] Remove larval InlineTypeNode in Unsafe intrinsics
-
- Resolved
-