Skip to content

8376104: C2 crashes in PhiNode::Ideal(PhaseGVN*, bool) accessing NULL pointer#112

Open
wkia wants to merge 1 commit intoopenjdk:masterfrom
wkia:b8376104
Open

8376104: C2 crashes in PhiNode::Ideal(PhaseGVN*, bool) accessing NULL pointer#112
wkia wants to merge 1 commit intoopenjdk:masterfrom
wkia:b8376104

Conversation

@wkia
Copy link

@wkia wkia commented Mar 13, 2026

Backporting JDK-8376104 C2 crashes in PhiNode::Ideal(PhaseGVN*, bool) accessing NULL pointer

This PR backports the fix for C2 segmentation fault that occurs on nullptr dereferencing when the call to MemNode::optimize_memory_chain within PhiNode::Ideal can kill the Phi node itself.

tier1 is OK

make test TEST=hotspot_compiler is OK


Progress

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

Issue

  • JDK-8376104: C2 crashes in PhiNode::Ideal(PhaseGVN*, bool) accessing NULL pointer (Bug - P3 - Requested)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 112

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk26u/pull/112.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 13, 2026

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

openjdk bot commented Mar 13, 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 947d5b6a0205f1d6d516521693dd29d543dada08 8376104: C2 crashes in PhiNode::Ideal(PhaseGVN*, bool) accessing NULL pointer Mar 13, 2026
@openjdk
Copy link

openjdk bot commented Mar 13, 2026

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 labels Mar 13, 2026
@openjdk
Copy link

openjdk bot commented Mar 13, 2026

⚠️ @wkia 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 13, 2026
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2026

Webrevs

@wkia
Copy link
Author

wkia commented Mar 13, 2026

/approval request I'd like to backport this to jdk26u. Clean backport. Tier1 is OK. This fix prevents a JVM segmentation fault during C2 optimization caused by dereferencing a nullptr while processing a dead node. It introduces a node check to ensure the node is not killed during optimization, that scenario was not processed before.

@openjdk
Copy link

openjdk bot commented Mar 13, 2026

@wkia
8376104: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Mar 13, 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