Skip to content

Conversation

Hamlin-Li
Copy link

@Hamlin-Li Hamlin-Li commented Sep 29, 2025

Hi,
Can you review this patch?

check #24182.

This patch

  • fix the crash,
  • do some simple code cleanup, I don't think this piece of code is necessary:
    if (!ext_V.enabled() && FLAG_IS_DEFAULT(UseRVV)) {
      warning("RVV is not supported on this CPU");
      FLAG_SET_DEFAULT(UseRVV, false);

Crash

crash when linux version < 6.8.5, with following command:

  • $ java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:+UseRVV -version

stack:

Stack: [0x00007f5d4d05a000,0x00007f5d4d25a000], sp=0x00007f5d4d255e80, free space=2031k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1661202] VM_Version::cpu_vector_length()+0x42 (vm_version_linux_riscv.cpp:103)
V [libjvm.so+0x1662b1c] VM_Version::common_initialize()+0x25a (vm_version_riscv.cpp:202)
V [libjvm.so+0x1662e0a] VM_Version::initialize()+0xc (vm_version_riscv.cpp:61)
V [libjvm.so+0x1660cca] VM_Version_init()+0x46 (vm_version.cpp:31)
V [libjvm.so+0xb6c538] init_globals()+0x68 (init.cpp:127)
V [libjvm.so+0x158daea] Threads::create_vm(JavaVMInitArgs*, bool*)+0x370 (threads.cpp:576)
V [libjvm.so+0xcd087c] JNI_CreateJavaVM+0x6e (jni.cpp:3587)
C [libjli.so+0x612c] JavaMain+0x7a (java.c:1499)
C [libjli.so+0x8eee] ThreadJavaMain+0xc (java_md.c:649)
C [libc.so.6+0x67552]
C [libc.so.6+0xb3b86]

Test

java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version | grep -e UseRVV -e MaxVectorSize
     intx MaxVectorSize                            = 0                                      {C2 product} {default}
     bool UseRVV                                   = false                             {ARCH diagnostic} {default}

java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:-UseRVV -version | grep -e UseRVV -e MaxVectorSize
     intx MaxVectorSize                            = 0                                      {C2 product} {default}
     bool UseRVV                                   = false                             {ARCH diagnostic} {command line}
java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:+UseRVV -version | grep -e UseRVV -e MaxVectorSize
     intx MaxVectorSize                            = 32                                     {C2 product} {default}
     bool UseRVV                                   = true                              {ARCH diagnostic} {command line}

Thanks


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8368893: RISC-V: crash after JDK-8352673 on fastdebug version (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27557/head:pull/27557
$ git checkout pull/27557

Update a local copy of the PR:
$ git checkout pull/27557
$ git pull https://git.openjdk.org/jdk.git pull/27557/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27557

View PR using the GUI difftool:
$ git pr show -t 27557

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27557.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 29, 2025

👋 Welcome back mli! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 29, 2025

@Hamlin-Li This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8368893: RISC-V: crash after JDK-8352673 on fastdebug version

Reviewed-by: fyang, dzhang

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 52 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Sep 29, 2025

@Hamlin-Li The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 29, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 29, 2025

Webrevs

Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 30, 2025
Copy link
Member

@DingliZhang DingliZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot [email protected] ready Pull request is ready to be integrated rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

3 participants