-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8287432: C2: assert(tn->in(0) != __null) failed: must have live top node #9060
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
Conversation
|
👋 Welcome back chagedorn! A progress list of the required criteria for merging this PR into |
|
@chhagedorn 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. |
Webrevs
|
vnkozlov
left a comment
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.
Your analysis and fix is correct.
|
@chhagedorn 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 123 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 |
TobiHartmann
left a comment
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.
Nice analysis and test. Looks good.
Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
|
Thanks Vladimir and Tobias for your reviews! |
|
I'm not qualified to review this, but I can confirm the test is triggering the |
Allows us to remove all of the compiler excludes we had to previously maintain. Investigated from openjdk/jdk#9060
|
Thanks @devinrsmith for confirming this! /integrate |
|
Going to push as commit 78d3712.
Your commit was automatically rebased without conflicts. |
|
@chhagedorn Pushed as commit 78d3712. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
@chhagedorn, thanks again! I'm hoping this can be backported to 11/17 - let me know if there is anything I can do to make that happen. |
When intrisifying
java.lang.Thread::currentThread(), we are creating anAddPnode that has thetopnode as base to indicate that we do not have an oop (usingNULLinstead leads to crashes as it does not seem to be expected to have aNULLbase):jdk/src/hotspot/share/opto/library_call.cpp
Line 904 in 6ff2d89
This node is used on a chain of data nodes into two

MemBarAcquirenodes as precedence edge in the test case:Later, in
final_graph_reshaping_impl(), we are removing the precedence edge of bothMemBarAcquirenodes and clean up all now dead nodes as a result of the removal:jdk/src/hotspot/share/opto/compile.cpp
Lines 3655 to 3679 in 6ff2d89
We iteratively call
disconnect_inputs()for all nodes that have no output anymore (i.e. dead nodes). This code, however, also treats thetopnode as dead sinceoutcnt()oftopis always zero:jdk/src/hotspot/share/opto/node.hpp
Lines 495 to 500 in 6ff2d89
And we end up disconnecting
topwhich results in the assertion failure.The code misses a check for
top(). I suggest to add this check before processing a node for whichoutcnt()is zero. This is a pattern which can also be found in other places in the code. I've checked all other usages ofoucnt() == 0and could not find a case where this additionaltop()check is missing. Maybe we should refactor these two checks into a single method at some point to not need to worry abouttopanymore in the future when checking if a node is dead based on the outputs.Thanks,
Christian
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/9060/head:pull/9060$ git checkout pull/9060Update a local copy of the PR:
$ git checkout pull/9060$ git pull https://git.openjdk.java.net/jdk pull/9060/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9060View PR using the GUI difftool:
$ git pr show -t 9060Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/9060.diff