Skip to content

Conversation

@shipilev
Copy link
Member

@shipilev shipilev commented Nov 26, 2025

Fixes JDK 21 -> JDK 25 regression in C2 that can lead to miscompilation. There is a regression test that captures the failure.

Additional testing:

  • Linux x86_64 server fastdebug, new regression test fails without the fix, passes with it
  • Linux x86_64 server fastdebug, all

Progress

  • Change must not contain extraneous whitespace
  • JDK-8370405 needs maintainer approval
  • Commit message must refer to an issue

Issue

  • JDK-8370405: C2: mismatched store from MergeStores wrongly scalarized in allocation elimination (Bug - P3 - Approved)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 26, 2025

👋 Welcome back shade! A progress list of the required criteria for merging this PR into pr/9 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 Nov 26, 2025

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

8370405: C2: mismatched store from MergeStores wrongly scalarized in allocation elimination

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 19 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 openjdk bot changed the title Backport 09a047f00c88d14505c42a966dedbc87b9be5bdf 8370405: C2: mismatched store from MergeStores wrongly scalarized in allocation elimination Nov 26, 2025
@openjdk
Copy link

openjdk bot commented Nov 26, 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 clean Identical backport; no merge resolution required rfr Pull request is ready for review labels Nov 26, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 26, 2025

Webrevs

@openjdk-notifier openjdk-notifier bot changed the base branch from pr/9 to master November 27, 2025 11:54
@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout JDK-8370405-c2-mismatched-store
git fetch https://git.openjdk.org/jdk25u-dev.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot removed the clean Identical backport; no merge resolution required label Nov 27, 2025
@shipilev shipilev force-pushed the JDK-8370405-c2-mismatched-store branch from 0b6efa6 to be9f05c Compare November 27, 2025 12:40
@openjdk
Copy link

openjdk bot commented Nov 27, 2025

@shipilev 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.

@openjdk openjdk bot added the clean Identical backport; no merge resolution required label Nov 27, 2025
@openjdk
Copy link

openjdk bot commented Nov 27, 2025

⚠️ @shipilev This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@shipilev
Copy link
Member Author

/approval request Fixes JDK 23 regression that will show up on JDK 25 as correctness bug. The fix is fairly new, but it is simple and conservative: blocks scalar replacement when mismatches stores are detected. New regression test fails without the fix, passes with it. All other tests pass. Risk is medium: touches C2, but in fairly conservative manner.

@openjdk
Copy link

openjdk bot commented Nov 28, 2025

@shipilev
8370405: The approval request has been created successfully.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Nov 28, 2025
@shipilev
Copy link
Member Author

shipilev commented Dec 3, 2025

Push approval granted.

/integrate

@openjdk
Copy link

openjdk bot commented Dec 3, 2025

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 3, 2025

@shipilev Pushed as commit d1b5b9a.

💡 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

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

1 participant