Skip to content

Conversation

jcking
Copy link

@jcking jcking commented Oct 17, 2025

Unclean backport to JDK 21. The area in question was changed for JDK 25. Same approximate fix except adds a missing LoadLoad barrier to TemplateTable::fast_xaccess.


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
  • JDK-8369506 needs maintainer approval

Issue

  • JDK-8369506: Bytecode rewriting causes Java heap corruption on AArch64 (Bug - P2)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2355/head:pull/2355
$ git checkout pull/2355

Update a local copy of the PR:
$ git checkout pull/2355
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2355/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2355

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2355.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 17, 2025

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

@jcking
Copy link
Author

jcking commented Oct 17, 2025

@shipilev Correct repo this time. PTAL to help verify barriers/fences for JDK 21.

@openjdk
Copy link

openjdk bot commented Oct 17, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport 18fd04770294e27011bd576b5ea5fe43fa03e5e3 8369506: Bytecode rewriting causes Java heap corruption on AArch64 Oct 17, 2025
@openjdk
Copy link

openjdk bot commented Oct 17, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base rfr Pull request is ready for review labels Oct 17, 2025
Co-authored-by: Man Cao <[email protected]>
Co-authored-by: Chuck Rasbold <[email protected]>
Reviewed-by: shade, aph, manc
Signed-off-by: Justin King <[email protected]>
Backport-of: 18fd04770294e27011bd576b5ea5fe43fa03e5e3
@openjdk
Copy link

openjdk bot commented Oct 17, 2025

@jcking Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@mlbridge
Copy link

mlbridge bot commented Oct 17, 2025

Webrevs

// get receiver
__ ldr(r0, aaddress(0));
// access constant pool cache
__ get_cache_and_index_at_bcp(r2, r3, 2);

Choose a reason for hiding this comment

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

I spent a little while looking at the other uses of get_cache_and_index_at_bcp and I couldn't find anything obviously wrong, but that might not mean we're OK.

Copy link
Author

Choose a reason for hiding this comment

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

Ran this change with our reproducer, and no observable failures. I also made verify_field_offset be present in the optimized build to be sure. So I think we are good. This is as approximate of a fix we can get I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants