Skip to content

8374783: C2 compilation asserts with "slice of address and input slice don't match"#31500

Open
robcasloz wants to merge 8 commits into
openjdk:masterfrom
robcasloz:JDK-8374783-slices-do-not-match-selective-cleanup
Open

8374783: C2 compilation asserts with "slice of address and input slice don't match"#31500
robcasloz wants to merge 8 commits into
openjdk:masterfrom
robcasloz:JDK-8374783-slices-do-not-match-selective-cleanup

Conversation

@robcasloz

@robcasloz robcasloz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This changeset forces an incremental inlining cleanup whenever an incrementally inlined call exposes an address where the offset becomes constant. This is necessary to prevent slice mismatches when parsing subsequent accesses to the address due to outdated IGVN-recorded address type information, see more details in the JBS issue. If not prevented, such mismatches can lead to e.g. incorrect memory graphs, as illustrated in the included test file.

This solution is the most effective and least intrusive one among a few evaluated options, see JBS issue.

Testing

  • tier1-4, stress test
  • original test (applications/ctw/modules/jdk_jpackage.java)
  • LLM-guided fuzzing (linux-x64 only)

Thanks to @iwanowww for useful discussions and suggestions!



Progress

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

Issue

  • JDK-8374783: C2 compilation asserts with "slice of address and input slice don't match" (Bug - P3)(⚠️ The fixVersion in this issue is [27] but the fixVersion in .jcheck/conf is 28, a new backport will be created when this pr is integrated.)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31500

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 12, 2026

Copy link
Copy Markdown

👋 Welcome back rcastanedalo! 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 commented Jun 12, 2026

Copy link
Copy Markdown

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

@openjdk openjdk Bot added hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Jun 12, 2026
@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

@robcasloz The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot

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

@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

@robcasloz robcasloz force-pushed the JDK-8374783-slices-do-not-match-selective-cleanup branch from 52ad24a to aca441c Compare June 12, 2026 12:25
@robcasloz

Copy link
Copy Markdown
Contributor Author

/label remove core-libs,hotspot

@openjdk openjdk Bot removed core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Jun 12, 2026
@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

@robcasloz
The core-libs label was successfully removed.

The hotspot label was successfully removed.

@robcasloz

Copy link
Copy Markdown
Contributor Author

/label add hotspot-compiler

@openjdk openjdk Bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jun 12, 2026
@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

@robcasloz
The hotspot-compiler label was successfully added.

@robcasloz robcasloz marked this pull request as ready for review June 12, 2026 13:56
@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 12, 2026
@mlbridge

mlbridge Bot commented Jun 12, 2026

Copy link
Copy Markdown

Webrevs

@merykitty

Copy link
Copy Markdown
Member

I think this does not cover all the cases. What if we have an Object + 8, then late inlining reveals that Object here really is an Integer, which means the access is really to Integer.value, will that raise a similar issue?

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 rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants