-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8309902: C2: assert(false) failed: Bad graph detected in build_loop_late after JDK-8305189 #14672
Conversation
👋 Welcome back roland! A progress list of the required criteria for merging this PR into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@rwestrel This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 88 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable. I will also remove any skipping of cast nodes in my patch for JDK-8288981.
@vnkozlov @chhagedorn thanks for the reviews |
/integrate |
Going to push as commit 26efff7.
Your commit was automatically rebased without conflicts. |
The crash happens after the following steps:
1- pre/main/post loops are created with assert predicates above the main loop.
2- the main loop is peeled
3- as a consequence, the
OpaqueZeroTripGuard
for the main loop is removed4- That allows narrowing of the type of the CastII that was added right
after the zero trip guard during pre/main/post loops creation
5- The CastII feeds into a range check CastII for the peeled iteration
that becomes top because the narrowed type of the first CastII
conflicts with the type recorded in the range check CastII.
6- The assert predicate that should fold to protect the range check
CastII doesn't because of the fix for JDK-8282592: on assert
predicate updates, the CastII at the zero trip guard is skipped. So
the range check CastII sees the narrowing of the type of the CastII
at the zero trip guard but the assert predicate doesn't.
The fix I propose is to revert that part of the change from
JDK-8282592 so both the range check CastII and the assert predicate
have the CastII at the zero trip guard as input and observe its type
updates. I went back to that bug and tried to reproduce the failure
again but couldn't. Reverting JDK-8281429 causes the bug to reproduce
again. I tried tweaking the test so the crash reproduces with
JDK-8281429 applied but couldn't.
This is caused by JDK-8305189 because step 3- happens because of
it. Before JDK-8305189, 3- happened after loop opts are over. I think
what happened then was that a template assertion predicate that was in
the process of having its
OpaqueLoopInit
andOpaqueLoopStride
removed constant folded so the crash wouldn't reproduce.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14672/head:pull/14672
$ git checkout pull/14672
Update a local copy of the PR:
$ git checkout pull/14672
$ git pull https://git.openjdk.org/jdk.git pull/14672/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14672
View PR using the GUI difftool:
$ git pr show -t 14672
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14672.diff
Webrev
Link to Webrev Comment