8373525: C2: assert(_base == Long) failed: Not a Long#28920
8373525: C2: assert(_base == Long) failed: Not a Long#28920dafedafe wants to merge 7 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back dfenacci! A progress list of the required criteria for merging this PR into |
|
@dafedafe 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 145 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 |
Webrevs
|
test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java
Outdated
Show resolved
Hide resolved
test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java
Outdated
Show resolved
Hide resolved
…otection.java Co-authored-by: Manuel Hässig <manuel@haessig.org>
mhaessig
left a comment
There was a problem hiding this comment.
Thanks for addressing my comments. Looks good to me.
chhagedorn
left a comment
There was a problem hiding this comment.
Otherwise, looks good to me, too, thanks!
test/hotspot/jtreg/compiler/loopopts/TestValidTypeInOverflowProtection.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Christian Hagedorn <christian.hagedorn@oracle.com>
Thanks for your suggestions @chhagedorn. I've just addressed them. |
Co-authored-by: Christian Hagedorn <christian.hagedorn@oracle.com>
|
Thank you for your reviews @mhaessig @chhagedorn. |
|
/integrate |
|
Going to push as commit a61a1d3.
Your commit was automatically rebased without conflicts. |
|
/backport :jdk26 |
|
@dafedafe the backport was successfully created on the branch backport-dafedafe-a61a1d32-jdk26 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk26, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk: |
Issue
Olivier's fuzzer found a test that makes C2 crash while running the optimization that collapses the addition with overflow-protection (
fold_subI_no_underflow_pattern).Causes
The crash happens because during
fold_subI_no_underflow_patternthe first input of theAddLnode (see comment below) becomes top.jdk/src/hotspot/share/opto/addnode.cpp
Lines 1525 to 1533 in 82b04f0
This happens because of a whole
IfFalsesubgraph that dies and nodes are being removed.AddLis not removed immediately as it has another input which is still alive but it is put in the IGVN worklist instead.Unfortunately the
fold_subI_no_underflow_patternoptimization runs before the next GVN pass and triggers the assert.Fix
fold_subI_no_underflow_patternshould actually take into account that we could have the graph in such a state and thatxcould be top. So, the sensible fix is not to presumexto be of type long and bailout if it is not.Testing
Tier 1-3+
(also checked for new regression test failure before the change)
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28920/head:pull/28920$ git checkout pull/28920Update a local copy of the PR:
$ git checkout pull/28920$ git pull https://git.openjdk.org/jdk.git pull/28920/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28920View PR using the GUI difftool:
$ git pr show -t 28920Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28920.diff
Using Webrev
Link to Webrev Comment