-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8338924: C1: assert(0 <= i && i < _len) failed: illegal index 5 for length 5 #20732
Conversation
…i < _len) failed: illegal index 5 for length 5
👋 Welcome back matsaave! A progress list of the required criteria for merging this PR into |
@matias9927 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 61 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 |
@matias9927 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. |
Please add a loop to the test so it triggers this issue without -Xcomp. |
Webrevs
|
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.
Just a comment.
*/ | ||
|
||
public class LastJsrTest { | ||
public static void main(String[] args) { | ||
LastJsr.test(); | ||
LastJsrReachable.test(); | ||
for (int i = 0; i < 1000; ++i) { |
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.
Don't you need 10,000 in your loop to trigger compilation?
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 for C2, but this is enough for C1, the only compiler that needs this fix. I wanted to make sure C1 compilation was triggered by default without -Xcomp. Testing tiers that use -Xcomp will make sure it passes with C2.
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.
Ok.
/contributor add @dean-long |
@matias9927 |
* @run main/othervm LastJsrTest | ||
* @run main/othervm | ||
* -Xbatch | ||
* LastJsrTest |
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.
I suggest to keep old command
too.
And I don't like spliting new command into several lines when it is very short.
|
||
if (bci + Bytecodes::length_for(code) >= method_len) break; | ||
|
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.
Please, use code style which use {}
and put body on separate line as you did in c1_GraphBuilder.cpp
You will not need empty lines around it then.
|
||
if (bci + Bytecodes::length_for(code) >= method_len) break; | ||
|
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.
Same here.
@@ -24,17 +24,22 @@ | |||
/* | |||
* @test | |||
* @bug 8335664 | |||
* @bug 8338924 |
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.
Drive-by comment: You can use @bug 8335664 8338924
instead.
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.
Good.
@@ -1389,6 +1389,11 @@ void GraphBuilder::jsr(int dest) { | |||
// If the bytecodes are strange (jumping out of a jsr block) then we | |||
// might end up trying to re-parse a block containing a jsr which | |||
// has already been activated. Watch for this case and bail out. | |||
if (next_bci() >= method()->code_size()) { | |||
// This can happen if the subroutine does not terminate with a ret, |
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.
Indentation is incorrect here (should be 2 whitespace instead of 4).
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 otherwise.
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.
Update is good.
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.
Still good.
Thanks for the reviews @TobiHartmann and @vnkozlov! Also thank you for the assistance @dean-long! |
Going to push as commit 1353601.
Your commit was automatically rebased without conflicts. |
@matias9927 Pushed as commit 1353601. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The change in JDK-8335664 caused a crash when initializing basic blocks with
-Xcomp
. This change introduces a check to see if JSR is the last bytecode in its method so that expected behavior matches the previous patch. Verified with tier 1-6 tests.Progress
Issue
Reviewers
Contributors
<dlong@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20732/head:pull/20732
$ git checkout pull/20732
Update a local copy of the PR:
$ git checkout pull/20732
$ git pull https://git.openjdk.org/jdk.git pull/20732/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20732
View PR using the GUI difftool:
$ git pr show -t 20732
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20732.diff
Webrev
Link to Webrev Comment