Skip to content
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

8290246: test fails "assert(init != __null) failed: initialization not found" #601

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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