[lworld] RFR: 8320437: [lworld] Adding internal null-restricted storage API points [v3]
Tobias Hartmann
thartmann at openjdk.org
Tue Nov 28 12:23:31 UTC 2023
On Fri, 24 Nov 2023 09:28:15 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> ```
> # SIGSEGV (0xb) at pc=0x00007f665bbba4cb, pid=1616701, tid=1616702
> #
> # JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-lworld4ea-2023-11-20-1024510.tobias...)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-lworld4ea-2023-11-20-1024510.tobias..., interpreted mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
> # Problematic frame:
> # V [libjvm.so+0xc174cb] FieldLayoutBuilder::inline_class_field_sorting(JavaThread*)+0x4cb```
I see as similar crash with this test:
import jdk.internal.vm.annotation.ImplicitlyConstructible;
import jdk.internal.vm.annotation.LooselyConsistentValue;
import jdk.internal.vm.annotation.NullRestricted;
@ImplicitlyConstructible
@LooselyConsistentValue
value class MyValue {
int x = 0;
}
public class Test {
@NullRestricted
MyValue vtField2;
public static void main(String[] args) {
}
}
`java --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED Test`
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fda53888090, pid=1828532, tid=1828533
#
# JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-lworld4ea-2023-11-20-1024510.tobias...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-lworld4ea-2023-11-20-1024510.tobias..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xc18090] FieldLayoutBuilder::regular_field_sorting(JavaThread*)+0x500
Stack: [0x00007fda52a16000,0x00007fda52b17000], sp=0x00007fda52b13ac0, free space=1014k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xc18090] FieldLayoutBuilder::regular_field_sorting(JavaThread*)+0x500 (array.hpp:126)
V [libjvm.so+0xc1d797] FieldLayoutBuilder::compute_regular_layout(JavaThread*)+0x27 (fieldLayoutBuilder.cpp:822)
V [libjvm.so+0xc1dad5] FieldLayoutBuilder::build_layout(JavaThread*)+0x45 (fieldLayoutBuilder.cpp:1015)
V [libjvm.so+0x98da69] ClassFileParser::post_process_parsed_stream(ClassFileStream const*, ConstantPool*, JavaThread*)+0x1799 (classFileParser.cpp:6631)
V [libjvm.so+0x98ee62] ClassFileParser::ClassFileParser(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const*, ClassFileParser::Publicity, JavaThread*)+0x392 (classFileParser.cpp:6022)
```
Setting `-XX:+EnablePrimitiveClasses` makes the issue disappear.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/947#issuecomment-1829733554
More information about the valhalla-dev
mailing list