Skip to content

8265956: JVM crashes when matching LShiftVB Node #3747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

Wanghuang-Huawei
Copy link

@Wanghuang-Huawei Wanghuang-Huawei commented Apr 28, 2021

It is fount that the rule match(Set dst (LShiftVB src shift)) is missing on many cpus, such like aarch64 and x86. It is this reason that JVM will crash under JDK-8265956's test case. In this commit, I :

  • show the crash case TestVectorShuffleIotaShort
  • solve the issue on aarch64 and x86 by adding the rule. solve the issue by adding LShiftCntVNode without adding any rule
  • test after fixing on tire1~3

Thank you for your review. Any suggestion is welcome.
Wang Huang


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Contributors

  • Wang Huang <whuang@openjdk.org>
  • Ai Jiaming <aijiaming1@huawei.com>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3747/head:pull/3747
$ git checkout pull/3747

Update a local copy of the PR:
$ git checkout pull/3747
$ git pull https://git.openjdk.java.net/jdk pull/3747/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3747

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3747.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 28, 2021

👋 Welcome back whuang! 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 openjdk bot added the rfr Pull request is ready for review label Apr 28, 2021
@openjdk
Copy link

openjdk bot commented Apr 28, 2021

@Wanghuang-Huawei The following label will be automatically applied to this pull request:

  • hotspot-compiler

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 hotspot-compiler hotspot-compiler-dev@openjdk.org label Apr 28, 2021
@Wanghuang-Huawei
Copy link
Author

/contributor add Wang Huang whuang@openjdk.org
/contributor add Ai Jiaming aijiaming1@huawei.com

@openjdk
Copy link

openjdk bot commented Apr 28, 2021

@Wanghuang-Huawei
Contributor Wang Huang <whuang@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Apr 28, 2021

@Wanghuang-Huawei
Contributor Ai Jiaming <aijiaming1@huawei.com> successfully added.

@mlbridge
Copy link

mlbridge bot commented Apr 28, 2021

Webrevs

@XiaohongGong
Copy link

Please update the copyright year of "vectorIntrinsics.cpp" to 2021. Thanks!

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.

Choose a reason for hiding this comment

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

Should be "2020, 2021" since it is not a new file.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you. I have changed that.

Comment on lines 59 to 63
static byte[] expected_64 = {1, 3, 5, 7, -7, -5, -3, -1};
static byte[] expected_128 = {1, 3, 5, 7, 9, 11, 13, 15, -15, -13, -11, -9, -7, -5, -3, -1};
static byte[] expected_256 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
-31, -29, -27, -25, -23, -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1};
static byte[] expected_512 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,

Choose a reason for hiding this comment

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

Looks much better to me! Just a small suggestion here: it's better to use static final if these arrays are not expected to be modified.

Copy link
Author

Choose a reason for hiding this comment

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

OK. Thank you for your review.

Copy link
Author

Choose a reason for hiding this comment

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

I have changed this.

@XiaohongGong
Copy link

LGTM, thanks!

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

The fix looks correct.

@openjdk
Copy link

openjdk bot commented May 10, 2021

@Wanghuang-Huawei 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:

8265956: JVM crashes when matching LShiftVB Node

Co-authored-by: Wang Huang <whuang@openjdk.org>
Co-authored-by: Ai Jiaming <aijiaming1@huawei.com>
Reviewed-by: kvn, jiefu

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 209 new commits pushed to the master branch:

  • 9713152: 8262092: vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java SIGSEGV in memmove_ssse3
  • 23446f1: 8265128: [REDO] Optimize Vector API slice and unslice operations
  • e5d3ee3: 8266802: Shenandoah: Round up region size to page size unconditionally
  • 8851cb6: 8266779: Use instead of ZERO_WIDTH_SPACE
  • 0cc7833: 8265208: [JEP-356] : SplittableRandom and SplittableGenerators - splits() methods does not throw NullPointerException when source is null
  • f78440a: 8266440: Shenandoah: TestReferenceShortcutCycle.java test failed on AArch64
  • de78431: 8241502: C2: Migrate x86_64.ad to MacroAssembler
  • c8b7447: 8266603: jpackage: Add missing copyright file in Java runtime .deb installers
  • c494efc: 8266774: System property values for stdout/err on Windows UTF-8
  • 25d99e5: 8266330: itableMethodEntry::initialize() asserts with archived old classes
  • ... and 199 more: https://git.openjdk.java.net/jdk/compare/e144104bb3f658391b1ac3e6beff5a2902e8e0a6...master

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@vnkozlov, @DamonFool) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 10, 2021
@Wanghuang-Huawei
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label May 11, 2021
@openjdk
Copy link

openjdk bot commented May 11, 2021

@Wanghuang-Huawei
Your change (at version 6dbb458) is now ready to be sponsored by a Committer.

Copy link
Member

@DamonFool DamonFool left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Thanks for your update.

@DamonFool
Copy link
Member

All the vectorapi tests passed in our x86 platforms.
So sponsor it.
Thanks.

/integrate

@DamonFool
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented May 11, 2021

@DamonFool Only the author (@Wanghuang-Huawei) is allowed to issue the integrate command. As this PR is ready to be sponsored, and you are an eligible sponsor, did you mean to issue the /sponsor command?

@openjdk openjdk bot closed this May 11, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 11, 2021
@openjdk
Copy link

openjdk bot commented May 11, 2021

@DamonFool @Wanghuang-Huawei Since your change was applied there have been 209 commits pushed to the master branch:

  • 9713152: 8262092: vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java SIGSEGV in memmove_ssse3
  • 23446f1: 8265128: [REDO] Optimize Vector API slice and unslice operations
  • e5d3ee3: 8266802: Shenandoah: Round up region size to page size unconditionally
  • 8851cb6: 8266779: Use instead of ZERO_WIDTH_SPACE
  • 0cc7833: 8265208: [JEP-356] : SplittableRandom and SplittableGenerators - splits() methods does not throw NullPointerException when source is null
  • f78440a: 8266440: Shenandoah: TestReferenceShortcutCycle.java test failed on AArch64
  • de78431: 8241502: C2: Migrate x86_64.ad to MacroAssembler
  • c8b7447: 8266603: jpackage: Add missing copyright file in Java runtime .deb installers
  • c494efc: 8266774: System property values for stdout/err on Windows UTF-8
  • 25d99e5: 8266330: itableMethodEntry::initialize() asserts with archived old classes
  • ... and 199 more: https://git.openjdk.java.net/jdk/compare/e144104bb3f658391b1ac3e6beff5a2902e8e0a6...master

Your commit was automatically rebased without conflicts.

Pushed as commit 10a049e.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants