Skip to content
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

8296924: C2: assert(is_valid_AArch64_address(dest.target())) failed: bad address #11412

Closed
wants to merge 2 commits into from

Conversation

TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Nov 29, 2022

With (unreachable) unsafe accesses, it can happen that the base address is invalid. On AArch64, C2 will emit a loadConP for loading the constant address that is implemented by aarch64_enc_mov_p calling MacroAssembler::adrp. The adrp implementation then asserts in is_valid_AArch64_address, assuming that we can only ever load constant pointers that are within the 48-bit AArch64 address space.

The fix, proposed by @theRealAph, is to emit a full-blown mov in case of a bad address.

Thanks,
Tobias


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-8296924: C2: assert(is_valid_AArch64_address(dest.target())) failed: bad address

Reviewers

Contributors

  • Andrew Haley <aph@openjdk.org>

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11412

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 29, 2022

👋 Welcome back thartmann! 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.

Copy link
Contributor

@theRealAph theRealAph left a comment

Choose a reason for hiding this comment

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

Thanks. That's obviously correct.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 29, 2022
@openjdk
Copy link

openjdk bot commented Nov 29, 2022

@TobiHartmann 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 Nov 29, 2022
@openjdk
Copy link

openjdk bot commented Nov 29, 2022

@TobiHartmann 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:

8296924: C2: assert(is_valid_AArch64_address(dest.target())) failed: bad address

Co-authored-by: Andrew Haley <aph@openjdk.org>
Reviewed-by: aph, kvn

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

  • 69ede5b: 8293177: Verify version numbers in legal files
  • cd6bebb: 8247645: ChaCha20 intrinsics
  • 33587ff: 8292625: jshell crash on "var a = a"
  • 2deb318: 8297065: DerOutputStream operations should not throw IOExceptions
  • d83a07b: 8297200: java/net/httpclient/SpecialHeadersTest.java failed once in AssertionError due to selector thread remaining alive
  • 5d2772a: 8297424: java/net/httpclient/AsyncExecutorShutdown.java fails in AssertionError due to misplaced assert
  • 361b50e: 8292594: Use CSS custom properties for all fonts and colors
  • 42b60ed: 8297030: Reduce Default Keep-Alive Timeout Value for httpclient
  • 1301fb0: 8296470: Refactor VMError::report STEP macro to improve readability
  • 48017b1: 8296804: Document HttpClient configuration properties in java.net.http module-info
  • ... and 1 more: https://git.openjdk.org/jdk/compare/b27a61e6240e19ae7802fc66894df90502508b9a...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.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 29, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 29, 2022

Webrevs

Co-authored-by: Andrew Haley <aph-open@littlepinkcloud.com>
@TobiHartmann
Copy link
Member Author

Thanks for the review and the help with the fix, Andrew!

@TobiHartmann
Copy link
Member Author

/contributor add @theRealAph

@openjdk
Copy link

openjdk bot commented Nov 29, 2022

@TobiHartmann
Contributor Andrew Haley <aph@openjdk.org> successfully added.

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.

Good.

@TobiHartmann
Copy link
Member Author

Thanks for the review, Vladimir!

@TobiHartmann
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 30, 2022

Going to push as commit abe532a.
Since your change was applied there have been 27 commits pushed to the master branch:

  • 5dcaf6c: 8297749: Remove duplicate space in the ProtocolException message being thrown from HttpURLConnection
  • c7a679f: 8297290: Use int indices to reference CDS archived primitive mirrors
  • 37f613b: 8297676: DataBuffer.TYPE_SHORT/TYPE_FLOAT/TYPE_DOUBLE are not placeholders
  • 87f00f4: 8296878: Document Filter attached to JPasswordField and setText("") is not cleared instead inserted characters replaced with unicode null characters
  • 9ced2ea: 8297311: Improve exception message thrown by java.net.HostPortrange::toLowerCase(String s)
  • defe060: 8296905: Replace the native LCMS#getProfileID() method with the accessor
  • e10778a: 8297695: Fix typos in test/langtools files
  • 0ce1827: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni
  • e2d71c0: 8297481: Create a regression test for JDK-4424517
  • f4063a3: 8297210: Add a @sealedGraph tag to selected java.desktop classes
  • ... and 17 more: https://git.openjdk.org/jdk/compare/b27a61e6240e19ae7802fc66894df90502508b9a...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 30, 2022
@openjdk openjdk bot closed this Nov 30, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 30, 2022
@openjdk
Copy link

openjdk bot commented Nov 30, 2022

@TobiHartmann Pushed as commit abe532a.

💡 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
3 participants