Skip to content

8343607: C2: Shenandoah crashes during barrier expansion in Continuation::enter #2029

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,9 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
}
}
}
// Load barrier on the control output of a call
if ((ctrl->is_Proj() && ctrl->in(0)->is_CallJava()) || ctrl->is_CallJava()) {
CallNode* call = ctrl->is_Proj() ? ctrl->in(0)->as_CallJava() : ctrl->as_CallJava();
CallJavaNode* call = ctrl->is_Proj() ? ctrl->in(0)->as_CallJava() : ctrl->as_CallJava();
if (call->entry_point() == OptoRuntime::rethrow_stub()) {
// The rethrow call may have too many projections to be
// properly handled here. Given there's no reason for a
Expand Down Expand Up @@ -1222,6 +1223,14 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
CallProjections projs;
call->extract_projections(&projs, false, false);

// If this is a runtime call, it doesn't have an exception handling path
if (projs.fallthrough_catchproj == nullptr) {
assert(call->method() == nullptr, "should be runtime call");
assert(projs.catchall_catchproj == nullptr, "runtime call should not have catch all projection");
continue;
}

// Otherwise, clone the barrier so there's one for the fallthrough and one for the exception handling path
#ifdef ASSERT
VectorSet cloned;
#endif
Expand Down