8268362: [REDO] C2 crash when compile negative Arrays.copyOf length after loop #4480
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This redos PR #4238
Some closed tests fail due to original PR, the main reasons are:
Based on previous PR #4238, this PR unifies CastIINode processing post AllocateArrayNode::make_ideal_length. Setup type and add into igvn worklist. Avoid apply GVN transform to break different assumptions in parser.
Based on closed test failrue message, two new tests are added
TestNegArrayLengthAsIndex1 : fail in debug build even without previous PR 8267904: C2 crash when compile negative Arrays.copyOf length after loop #4238, it loads a negative array length and apply GVN transform (In GraphKit::load_array_length) which covert length to top node. It also assert in Parse::array_addressing.
TestNegArrayLengthAsIndex2 : similar with failrue in https://bugs.openjdk.java.net/browse/JDK-8268301
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4480/head:pull/4480
$ git checkout pull/4480
Update a local copy of the PR:
$ git checkout pull/4480
$ git pull https://git.openjdk.java.net/jdk pull/4480/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4480
View PR using the GUI difftool:
$ git pr show -t 4480
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4480.diff