RFR: 8292301: [REDO v2] C2 crash when allocating array of size too large [v2]
Roland Westrelin
roland at openjdk.org
Fri Sep 9 12:33:16 UTC 2022
On Thu, 8 Sep 2022 07:16:26 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Looks good otherwise.
Thanks for reviewing.
> src/hotspot/share/opto/loopopts.cpp line 2040:
>
>> 2038: // loop to determine which way the loop exited.
>> 2039: // Loop predicate If node connects to Bool node through Opaque1 node.
>> 2040: if (use->is_If() || use->is_CMove() || C->is_predicate_opaq(use) || use->Opcode() == Op_Opaque4 ||
>
> Please add a comment describing the new case.
Done in updated change.
> src/hotspot/share/opto/loopopts.cpp line 2410:
>
>> 2408: while (split_if_set->size()) {
>> 2409: Node *iff = split_if_set->pop();
>> 2410: uint input = iff->Opcode() == Op_AllocateArray ? AllocateNode::ValidLengthTest : 1;
>
> Suggestion:
>
> uint input = (iff->Opcode() == Op_AllocateArray) ? AllocateNode::ValidLengthTest : 1;
I left that one out as I think this pattern is common enough that it shouldn't be ambiguous.
> src/hotspot/share/opto/phaseX.cpp line 1643:
>
>> 1641: }
>> 1642: }
>> 1643: if (use_op == Op_AllocateArray && n == use->in(AllocateNode::ValidLengthTest)) {
>
> Please add a comment.
Done in an updated change.
-------------
PR: https://git.openjdk.org/jdk/pull/10038
More information about the hotspot-compiler-dev
mailing list