-
Notifications
You must be signed in to change notification settings - Fork 109
8349068: [lworld] C2 compilation fails with "not enough operands for reexecution" #1363
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
base: lworld
Are you sure you want to change the base?
Conversation
👋 Welcome back qamai! A progress list of the required criteria for merging this PR into |
@merykitty 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 273 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
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.
The fix looks reasonable to me. Just wondering, as an alternative, could we weaken the assert by checking if the call is to OptoRuntime::rethrow_stub
?
I disagree with removing the assert. It seems like we should be skipping this code if |
I just wanted to add the same comment. If this is indeed the same issue as JDK-8350208, the fix should be done in mainline and JDK-8349068 should be closed as duplicate. |
@@ -938,7 +938,6 @@ void GraphKit::add_safepoint_edges(SafePointNode* call, bool must_throw) { | |||
int inputs = 0, not_used; // initialized by GraphKit::compute_stack_effects() | |||
assert(method() == youngest_jvms->method(), "sanity"); | |||
assert(compute_stack_effects(inputs, not_used), "unknown bytecode: %s", Bytecodes::name(java_bc())); | |||
assert(out_jvms->sp() >= (uint)inputs, "not enough operands for reexecution"); |
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.
Removal of this assertion looks incorrect, given that stack holds the active expressions this sanity check ensures that required number of inputs needed to re-construction of interpreter frame are present.
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.
This will be fixed by JDK-8350208 in mainline.
@merykitty This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Hi,
The issue here is that
GraphKit::make_runtime_call
is often used to execute a bytecode. As a result, it expects that it may deoptimize and thus need to reexecute the current bytecode in the interpreter. This is the intention of theassert
, to verify that we are having enough operands for reexecution of the bytecode. However, in the failing case,GraphKit::make_runtime_call
is not used to execute the bytecode, but to handle the exceptions thrown by that bytecode. In this case, the bytecode itself has finished executing and must not be reexecuted, we can see that inParse::catch_inline_exceptions
:As a result, reexecution is impossible and we don't need to worry about the operand stack, I propose removing the
assert
as it seems to be the cleanest fix.The reason this only fails on
lworld
is because here the execution ofaastore
involves a static Java call, resulting in a potential exception that needs catching.Please share your thoughts, thanks a lot.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1363/head:pull/1363
$ git checkout pull/1363
Update a local copy of the PR:
$ git checkout pull/1363
$ git pull https://git.openjdk.org/valhalla.git pull/1363/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1363
View PR using the GUI difftool:
$ git pr show -t 1363
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1363.diff
Using Webrev
Link to Webrev Comment