-
Notifications
You must be signed in to change notification settings - Fork 145
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
8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL #529
Conversation
👋 Welcome back mbalao! A progress list of the required criteria for merging this PR into |
@martinuy This change now passes all automated pre-integration checks. 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
This backport pull request has now been updated with issue from the original commit. |
The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork: git checkout JDK-8303466
git fetch https://git.openjdk.org/jdk8u-dev.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push |
GHA test failures notes: The GHA test CheckAllocateAndSystemGC doesn't seem to be stable in Linux x86: it has failed before (see PR #427 and run here) and the failure looks unrelated to this change. The GHA test TestCMSHeapSizeFlags doesn't seem to be stable either in Linux x86: in the previous run of this PR (before the rebase made after the integration of 8262017 to 8u-dev) it was passing for example, and no code changes were introduced between the two. |
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 to me. The change is largely the same as 11u; if we ignore whitespace differences, most of the changes come down to the need for additional casts in 8u. Adding the set_req_X
helper function here seems fine, without backporting an unrelated fix and the consequential risk.
|
/approval request jdk8u is affected by this bug and would benefit from its fix. The patch does not apply cleanly but has been reviewed. |
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 to me.
/approve yes |
@gnu-andrew |
/integrate |
Going to push as commit 54f7734. |
virtual const Type* add_id() const { return TypeLong::make(min_jlong); } | ||
virtual const Type* bottom_type() const { return TypeLong::LONG; } | ||
virtual uint ideal_reg() const { return Op_RegL; } | ||
virtual Node* Identity(PhaseGVN* phase); |
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.
Is it OK that MaxLNode::Identity
has different signature than AddNode::Identity
?
virtual Node *Identity( PhaseTransform *phase );
Tha same question is for MinLNode and ConvI2LNode.
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.
Yes, as JDK-8146629 (openjdk/jdk11u@69b52aa) doesn't have a 8u backport, it would have been neater to have PhaseTransform* phase
.
What happened here is that neither the patch application nor the compilation failed, since PhaseGVN
inherits from PhaseValues
, which inherits from PhaseTransform
.
However, there shouldn't be any issue, as the C++ type system is ensuring that all the callers are passing a PhaseGVN
pointer.
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.
Compilation didn't fail because not all the warnings are enabled.
Enabling -Woverloaded-virtual
causes a number of warnings like the following:
hotspot/src/share/vm/opto/addnode.hpp:50:17: error: ‘virtual Node* AddNode::Identity(PhaseTransform*)’ was hidden [-Werror=overloaded-virtual]
50 | virtual Node *Identity( PhaseTransform *phase );
hotspot/src/share/vm/opto/addnode.hpp:312:17: error: by ‘virtual Node* MinLNode::Identity(PhaseGVN*)’ [-Werror=overloaded-virtual]
312 | virtual Node* Identity(PhaseGVN* phase);
that may point to a serious bug.
In few words, MinLNode::Identity
may be never called in case:
AddNode *obj = new MinLNode;
obj->Identity(...); // AddNode::Identity() is called.
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.
You are right, I was missing the MaxLNode
←MaxNode
←AddNode
inheritance and the fact that MaxLNode::Identity(PhaseGVN* phase)
doesn't override but hides AddNode::Identity(PhaseTransform* phase)
, sorry for the confusion.
After my comment, we continued analyzing it with @martinuy and arrived to similar conclusions. We'll be proposing a fix for this later today.
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.
As this pull request is already integrated, I have created the JDK-8335552: [8u] JDK-8303466 backport to 8u requires 3 ::Identity signature fixes follow up.
Hi,
I would like to propose a backport of 8303466 [1] to jdk8u. jdk8u can benefit from this fix and having more accurate limit type information.
This pull request contains a backport of commit 8578e12c423ed61618e0b3ef81e5be3d18be1da2 from the openjdk/jdk11u-dev repository.
This backport depends on JDK-8262017.
The jdk11u patch does not apply cleanly because of the following:
hotspot/src/share/vm/opto/addnode.hpp
hotspot/src/share/vm/runtime/vmStructs.cpp
hotspot/src/share/vm/opto/macro.cpp
hotspot/src/share/vm/opto/loopTransform.cpp
In addition, the following changes were made:
Nodes allocation follows the pattern "new (C) ..." instead of "new ...".
File locations were adjusted.
In addnode.cpp, 8u does not have 8284358 so the function "Node::set_req_X(uint i, Node *n, PhaseGVN *gvn)" is not available. Picked this function (declaration and definition) from 8284358.
In 8u, the jtreg VM prop vm.compiler2.enabled does not exist. C2 will likely be available and if the test were executed without C2, it should be harmless.
No regressions observed in hotspot:tier1.
Thanks,
Martin.-
--
[1] - https://bugs.openjdk.org/browse/JDK-8303466
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/529/head:pull/529
$ git checkout pull/529
Update a local copy of the PR:
$ git checkout pull/529
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/529/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 529
View PR using the GUI difftool:
$ git pr show -t 529
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/529.diff
Webrev
Link to Webrev Comment