[0] Build JDK with the fix in JDK-8304168
[1] Prepare default CDS archive with:
java -Xshare:dump --enable-preview
[3] Run ObjectMethods.java. It will fail with dereferencing a null pointer for a Method
# SIGSEGV (0xb) at pc=0x00007fe8130a91c6, pid=1649767, tid=1649796
#
# JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.iklam.val)
# Java VM: JavaHotSpot(TM) 64-Bit Server VM (fastdebug 22-internal-adhoc.iklam.val, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x13ee1c6] Method::is_scalarized_arg(int) const+0x16
Stack: [0x00007fe799d00000,0x00007fe799e00000], sp=0x00007fe799df8158, free space=992k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x13ee1c6] Method::is_scalarized_arg(int) const+0x16 (growableArray.hpp:92)
V [libjvm.so+0x16506ea] AdapterHandlerLibrary::get_adapter(methodHandle const&)+0xda (sharedRuntime.cpp:3173)
V [libjvm.so+0x13eaaa8] Method::make_adapters(methodHandle const&, JavaThread*)+0x18 (method.cpp:1292)
V [libjvm.so+0x13eb172] Method::link_method(methodHandle const&, JavaThread*)+0x92 (method.cpp:1276)
V [libjvm.so+0xe6c6e2] InstanceKlass::link_methods(JavaThread*)+0xa2 (instanceKlass.cpp:1141)
V [libjvm.so+0xe6d3f4] InstanceKlass::link_class_impl(JavaThread*) [clone .part.0]+0x954 (instanceKlass.cpp:1084)
V [libjvm.so+0xe6da08] InstanceKlass::link_class(JavaThread*)+0x78 (instanceKlass.cpp:835)
V [libjvm.so+0x1409910] MethodHandles::resolve_MemberName(Handle, Klass*, int, bool, JavaThread*)+0x2d0 (methodHandles.cpp:735)
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000018
Registers:
RAX=0x00007fe80c165520, RBX=0x0000000000000000, RCX=0x00007fe774001098, RDX=0x0000000000000000
RSP=0x00007fe799df8158, RBP=0x00007fe799df8260, RSI=0x0000000000000001, RDI=0x00007fe79a68b188
R8 =0x0000000000000000, R9 =0x0000000000000000, R10=0x0000000000000000, R11=0x00007fe813dae964
R12=0x0000000000000000, R13=0x0000000000000001, R14=0x00007fe774001098, R15=0x0000000000000000
RIP=0x00007fe8130a91c6, EFLAGS=0x0000000000010202, CSGSFS=0x002b000000000033, ERR=0x0000000000000004
[1] Prepare default CDS archive with:
java -Xshare:dump --enable-preview
[3] Run ObjectMethods.java. It will fail with dereferencing a null pointer for a Method
# SIGSEGV (0xb) at pc=0x00007fe8130a91c6, pid=1649767, tid=1649796
#
# JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.iklam.val)
# Java VM: JavaHotSpot(TM) 64-Bit Server VM (fastdebug 22-internal-adhoc.iklam.val, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x13ee1c6] Method::is_scalarized_arg(int) const+0x16
Stack: [0x00007fe799d00000,0x00007fe799e00000], sp=0x00007fe799df8158, free space=992k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x13ee1c6] Method::is_scalarized_arg(int) const+0x16 (growableArray.hpp:92)
V [libjvm.so+0x16506ea] AdapterHandlerLibrary::get_adapter(methodHandle const&)+0xda (sharedRuntime.cpp:3173)
V [libjvm.so+0x13eaaa8] Method::make_adapters(methodHandle const&, JavaThread*)+0x18 (method.cpp:1292)
V [libjvm.so+0x13eb172] Method::link_method(methodHandle const&, JavaThread*)+0x92 (method.cpp:1276)
V [libjvm.so+0xe6c6e2] InstanceKlass::link_methods(JavaThread*)+0xa2 (instanceKlass.cpp:1141)
V [libjvm.so+0xe6d3f4] InstanceKlass::link_class_impl(JavaThread*) [clone .part.0]+0x954 (instanceKlass.cpp:1084)
V [libjvm.so+0xe6da08] InstanceKlass::link_class(JavaThread*)+0x78 (instanceKlass.cpp:835)
V [libjvm.so+0x1409910] MethodHandles::resolve_MemberName(Handle, Klass*, int, bool, JavaThread*)+0x2d0 (methodHandles.cpp:735)
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000018
Registers:
RAX=0x00007fe80c165520, RBX=0x0000000000000000, RCX=0x00007fe774001098, RDX=0x0000000000000000
RSP=0x00007fe799df8158, RBP=0x00007fe799df8260, RSI=0x0000000000000001, RDI=0x00007fe79a68b188
R8 =0x0000000000000000, R9 =0x0000000000000000, R10=0x0000000000000000, R11=0x00007fe813dae964
R12=0x0000000000000000, R13=0x0000000000000001, R14=0x00007fe774001098, R15=0x0000000000000000
RIP=0x00007fe8130a91c6, EFLAGS=0x0000000000010202, CSGSFS=0x002b000000000033, ERR=0x0000000000000004
- links to
-
Commit(lworld) openjdk/valhalla/9f3f535b
-
Review(lworld) openjdk/valhalla/1180