Details
-
Bug
-
Resolution: Fixed
-
P4
-
19, 20, 21
-
b25
-
aarch64
-
linux
Description
=====================
# Reproduce on hardware without PAC
./configure --with-debug-level=fastdebug
make images
./images/jdk/bin/java -XX:UseBranchProtection=pac-ret --version
=====================
# error log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x0000fffe87d847c8, pid=3520802, tid=3520803
#
# JRE version: (21.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 21-internal-adhoc.jdk-src-dev, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# v ~StubRoutines::jbyte_arraycopy 0x0000fffe87d847c8
=====================
# call stack
Stack: [0x0000fffe9f2a0000,0x0000fffe9f4a0000], sp=0x0000fffe9f49e210, free space=2040k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v ~StubRoutines::jbyte_arraycopy 0x0000fffe87d847c8
V [libjvm.so+0x16fa75c] StubRoutines::initialize_final_stubs()+0x5c (stubRoutines.cpp:335)
V [libjvm.so+0xd7029c] init_globals()+0xcc (init.cpp:174)
V [libjvm.so+0x17b3274] Threads::create_vm(JavaVMInitArgs*, bool*)+0x2d4 (threads.cpp:549)
V [libjvm.so+0xed3860] JNI_CreateJavaVM+0x9c (jni.cpp:3571)
C [libjli.so+0x3810] JavaMain+0x7c (java.c:1459)
C [libjli.so+0x70ec] ThreadJavaMain+0xc (java_md.c:650)
C [libc.so.6+0x7d5c8]
=====================
#
StubRoutines::jbyte_arraycopy [0x0000fffe87d847c4, 0x0000fffe87d84958] (404 bytes)--------------------------------------------------------------------------------
0x0000fffe87d847c4: ldr xzr, [x30]
0x0000fffe87d847c8: pacia x30, x29 <--------- unrecognized instruction
0x0000fffe87d847cc: stp x29, x30, [sp, #-16]!
0x0000fffe87d847d0: mov x29, sp
0x0000fffe87d847d4: sub x8, x1, x0
0x0000fffe87d847d8: cmp x8, x2
0x0000fffe87d847dc: b.cs Stub::jbyte_disjoint_arraycopy+16 0x0000fffe87d84650 // b.hs, b.nlast
0x0000fffe87d847e0: prfm pldl1keep, [x0]
0x0000fffe87d847e4: cmp x2, #0x60
0x0000fffe87d847e8: b.hi Stub::jbyte_arraycopy+256 0x0000fffe87d848c4 // b.pmore
# Reproduce on hardware without PAC
./configure --with-debug-level=fastdebug
make images
./images/jdk/bin/java -XX:UseBranchProtection=pac-ret --version
=====================
# error log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x0000fffe87d847c8, pid=3520802, tid=3520803
#
# JRE version: (21.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 21-internal-adhoc.jdk-src-dev, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# v ~StubRoutines::jbyte_arraycopy 0x0000fffe87d847c8
=====================
# call stack
Stack: [0x0000fffe9f2a0000,0x0000fffe9f4a0000], sp=0x0000fffe9f49e210, free space=2040k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v ~StubRoutines::jbyte_arraycopy 0x0000fffe87d847c8
V [libjvm.so+0x16fa75c] StubRoutines::initialize_final_stubs()+0x5c (stubRoutines.cpp:335)
V [libjvm.so+0xd7029c] init_globals()+0xcc (init.cpp:174)
V [libjvm.so+0x17b3274] Threads::create_vm(JavaVMInitArgs*, bool*)+0x2d4 (threads.cpp:549)
V [libjvm.so+0xed3860] JNI_CreateJavaVM+0x9c (jni.cpp:3571)
C [libjli.so+0x3810] JavaMain+0x7c (java.c:1459)
C [libjli.so+0x70ec] ThreadJavaMain+0xc (java_md.c:650)
C [libc.so.6+0x7d5c8]
=====================
#
StubRoutines::jbyte_arraycopy [0x0000fffe87d847c4, 0x0000fffe87d84958] (404 bytes)--------------------------------------------------------------------------------
0x0000fffe87d847c4: ldr xzr, [x30]
0x0000fffe87d847c8: pacia x30, x29 <--------- unrecognized instruction
0x0000fffe87d847cc: stp x29, x30, [sp, #-16]!
0x0000fffe87d847d0: mov x29, sp
0x0000fffe87d847d4: sub x8, x1, x0
0x0000fffe87d847d8: cmp x8, x2
0x0000fffe87d847dc: b.cs Stub::jbyte_disjoint_arraycopy+16 0x0000fffe87d84650 // b.hs, b.nlast
0x0000fffe87d847e0: prfm pldl1keep, [x0]
0x0000fffe87d847e4: cmp x2, #0x60
0x0000fffe87d847e8: b.hi Stub::jbyte_arraycopy+256 0x0000fffe87d848c4 // b.pmore
Attachments
Issue Links
- relates to
-
JDK-8287325 AArch64: fix virtual threads with -XX:UseBranchProtection=pac-ret
- Resolved
-
JDK-8277204 Implement PAC-RET branch protection on Linux/AArch64
- Resolved