Skip to content

8375010: C2 VectorAPI: assert(vbox->is_CheckCastPP()) failed: should be expanded#426

Open
0zzy0sbourne wants to merge 1 commit intoopenjdk:masterfrom
0zzy0sbourne:JDK-8375010
Open

8375010: C2 VectorAPI: assert(vbox->is_CheckCastPP()) failed: should be expanded#426
0zzy0sbourne wants to merge 1 commit intoopenjdk:masterfrom
0zzy0sbourne:JDK-8375010

Conversation

@0zzy0sbourne
Copy link
Copy Markdown

@0zzy0sbourne 0zzy0sbourne commented Mar 26, 2026

This is a backport of JDK-8375010

The check vect->is_Vector() || vect->is_LoadVector() in expand_vbox_node_helper does not handle Proj nodes that resolve to vector types, causing an assertion failure when such nodes flow through a Phi into VectorBox. The fix handles these two additional cases (VectorBox inside a Phi or Proj node), preventing the assert crash.

Tested: VectorBoxExpandPhi.java and VectorBoxExpandProj.java pass.


Progress

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

Issues

  • JDK-8375010: C2 VectorAPI: assert(vbox->is_CheckCastPP()) failed: should be expanded (Bug - P3 - Requested)
  • JDK-8374903: C2 VectorAPI: assert(vbox->as_Phi()->region() == vect->as_Phi()->region()) failed (Bug - P3 - Requested)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 426

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Mar 26, 2026

👋 Welcome back 0zzy0sbourne! 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
Copy link
Copy Markdown

openjdk bot commented Mar 26, 2026

❗ 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 e85d5d7a16024f6a3eda14f1e08f72e07ae38dd0 8375010: C2 VectorAPI: assert(vbox->is_CheckCastPP()) failed: should be expanded Mar 26, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 26, 2026

This backport pull request has now been updated with issues 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 labels Mar 26, 2026
@0zzy0sbourne 0zzy0sbourne marked this pull request as ready for review March 26, 2026 22:49
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 26, 2026

⚠️ @0zzy0sbourne 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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 26, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 26, 2026

Webrevs

@0zzy0sbourne
Copy link
Copy Markdown
Author

/approval request for backport of JDK-8375010: C2 VectorAPI: assert(vbox->is_CheckCastPP()) failed: should be expanded.

This is a bug where expand_vbox_node_helper hits a fatal assert when the vector box node is not a CheckCastPP as expected. The check vect->is_Vector() || vect->is_LoadVector() does not handle Proj nodes that resolve to vector types, causing an assertion failure when such nodes flow through a Phi into VectorBox. Fixing this is important as it causes a hard JVM crash during Vector API compilation with no recovery path. The fix handles these two additional cases (VectorBox inside a Phi or Proj node), preventing the assert crash. The risk is low, the change is well-contained within expand_vbox_node_helper and adds handling for previously unhandled graph shapes without modifying existing logic. The patch from the JDK Project applies cleanly with no conflicts. Test coverage: VectorBoxExpandPhi.java and VectorBoxExpandProj.java pass.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 26, 2026

@0zzy0sbourne
8375010: The approval request has been created successfully.
8374903: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received 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

Development

Successfully merging this pull request may close these issues.

1 participant