8385420: C2: SIGSEGV in compiled code due to missing ctrl#31368
8385420: C2: SIGSEGV in compiled code due to missing ctrl#31368merykitty wants to merge 2 commits into
Conversation
|
👋 Welcome back qamai! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@merykitty The following label will be automatically applied to this pull request:
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. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
iwanowww
left a comment
There was a problem hiding this comment.
Looks good.
What could be a validation check here to ensure no other problematic case is omitted? A node without control [1]?
[1]
default:
assert(use->in(0) != nullptr, "%s", NodeClassNames[use->Opcode()]);
| case Op_CheckCastPP: | ||
| case Op_CastPP: | ||
| case Op_CMoveP: | ||
| case Op_CMoveN: |
There was a problem hiding this comment.
I think keeping "switch" and "case" aligned is the more common HotSpot style. Also a comment explaining why we choose this subset of nodes would help.
There was a problem hiding this comment.
Hi @franciscoarturorivera371-cyber, thanks for making a comment in an OpenJDK project!
All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user franciscoarturorivera371-cyber" for the summary.
If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
- I agree to the OpenJDK Terms of Use for all comments I make in a project in the OpenJDK GitHub organization.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.
Hi,
We have a load and its base is a
CMoveP, theCMovePmerges 2 not-null values, one of which is aCastPPto not-null of the method parameter, while the other is a not-null constant. As a result, theCMovePis not-null, and the graph is valid. However, duringfinal_graph_reshaping, we try to removeCastPPNodes from the graph, this requires us to pin all of the depending accesses of thatCastPPbelow the control input of theCastPPthat is going away. The logic looks through some kinds of nodes, but it missesCMoveP. As a result, the load from theCastPPis not pinned correctly, and floats up above the null check.This PR fixes the issue by adding
CMoveto the cases which require us looking through to look for accesses.Testing:
Please take a look and leave your reviews, thanks a lot.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31368/head:pull/31368$ git checkout pull/31368Update a local copy of the PR:
$ git checkout pull/31368$ git pull https://git.openjdk.org/jdk.git pull/31368/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 31368View PR using the GUI difftool:
$ git pr show -t 31368Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31368.diff
Using Webrev
Link to Webrev Comment