JDK-8286596 : AArch64: -XX:UseBranchProtection=pac-ret crashes after JDK-8284161
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P2
  • Status: In Progress
  • Resolution: Unresolved
  • OS: linux
  • CPU: aarch64
  • Submitted: 2022-05-11
  • Updated: 2022-05-12
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 19
19Unresolved
Related Reports
Relates :  
Description
$ ./build/linux-aarch64-server-fastdebug/jdk/bin/java -XX:UseBranchProtection=pac-ret -version
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000ffff7100250c, pid=1032126, tid=1032127
#
# JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc.entuser.jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc.entuser.jdk, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# J 8 c1 java.lang.StringLatin1.hashCode([B)I java.base (42 bytes) @ 0x0000ffff7100250c [0x0000ffff71002500+0x000000000000000c]
#
# Core dump will be written. Default location: /tmp/core.1032126
#
# An error report file with more information is saved as:
# /home/ent-user/jdk/hs_err_pid1032126.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8682 Date: 2022-05-12 14:52:18 +0000
12-05-2022

Yes that's right. It's a bit of a pain to test as there isn't much publicly available hardware that supports it yet. The best option is the Apple M1 with a Fedora VM or Docker container (macOS doesn't enable it by default). For this crash the fix is pretty straightforward. I'll submit the patch later today.
12-05-2022

I'm trying to see if this could had been caught by the testing done on JEP 425 prior to integration. Would I be correct to say that this feature is only enabled if you configure/build with --enable-branch-protection and run on special HW has has this feature?
12-05-2022

ILW = crash in c1 generated code; on aarch64 with UseBranchProtection flag; no workaround = HLH = P2
11-05-2022