Skip to content

8383823: C2: Meet not symmetric for TypeAryKlassPtr types#31714

Open
hgqxjj wants to merge 1 commit into
openjdk:masterfrom
hgqxjj:8383823
Open

8383823: C2: Meet not symmetric for TypeAryKlassPtr types#31714
hgqxjj wants to merge 1 commit into
openjdk:masterfrom
hgqxjj:8383823

Conversation

@hgqxjj

@hgqxjj hgqxjj commented Jun 29, 2026

Copy link
Copy Markdown
Member

Description:

While working on another C2 type-analysis PR (#30690), I used TypeKlassPtr::filter(). This exposed a Meet Not Symmetric assert in some GHA test jobs involving TypeAryKlassPtr.

The issue is in TypeAryKlassPtr::xmeet(). meet_aryptr() may widen the outer array klass pointer from Constant to NotNull, but the element klass pointer may still keep the more precise type computed before that widening.The resulting TypeAryKlassPtr can then fail the meet/dual symmetry check and trigger the Meet Not Symmetric assert.

Solution:

When meet_aryptr() returns NOT_SUBTYPE and widens the outer array klass pointer from Constant to NotNull, recompute the element klass pointer meet after lowering AnyNull element klass pointers to NotNull.

Test:

GHA

No standalone regression test has been added yet. I have not yet been able to reduce the failure to a small standalone test case.

The issue is reproducible through the other in-progress C2 type-analysis PR (#30690) which uses TypeKlassPtr::filter(). With this fix applied, the Meet Not Symmetric assert no longer reproduces in those GHA test jobs.



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-8383823: C2: Meet not symmetric for TypeAryKlassPtr types (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31714

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 29, 2026

Copy link
Copy Markdown

👋 Welcome back ghan! 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 29, 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 the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jun 29, 2026
@openjdk

openjdk Bot commented Jun 29, 2026

Copy link
Copy Markdown

@hgqxjj 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 commented Jun 29, 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-compiler. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 29, 2026
@mlbridge

mlbridge Bot commented Jun 29, 2026

Copy link
Copy Markdown

Webrevs

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.

1 participant