Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8290246: test fails "assert(init != __null) failed: initialization no…
…t found"

Backport-of: 70fce07a382896a8091413d7269bb16f33122505
  • Loading branch information
GoeLin committed Jul 28, 2022
1 parent 186745e commit a747955
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/hotspot/share/opto/callnode.cpp
Expand Up @@ -1711,13 +1711,16 @@ Node *AllocateArrayNode::make_ideal_length(const TypeOopPtr* oop_type, PhaseTran
"narrow type must be narrower than length type");

// Return NULL if new nodes are not allowed
if (!allow_new_nodes) return NULL;
if (!allow_new_nodes) {
return NULL;
}
// Create a cast which is control dependent on the initialization to
// propagate the fact that the array length must be positive.
InitializeNode* init = initialization();
assert(init != NULL, "initialization not found");
length = new CastIINode(length, narrow_length_type);
length->set_req(TypeFunc::Control, init->proj_out_or_null(TypeFunc::Control));
if (init != NULL) {
length = new CastIINode(length, narrow_length_type);
length->set_req(TypeFunc::Control, init->proj_out_or_null(TypeFunc::Control));
}
}
}

Expand Down

1 comment on commit a747955

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.