Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13467,7 +13467,7 @@ PCODE UnsafeJitFunction(PrepareCodeConfig* config,
}

// If the interpreter was loaded, use it.
if (interpreterMgr->IsInterpreterLoaded())
if (interpreterMgr->IsInterpreterLoaded() && (!ftn->IsILStub() || !ftn->AsDynamicMethodDesc()->IsAsyncResumeStub())) // Async resume stubs cannot be generated by the interpreter
{
CInterpreterJitInfo interpreterJitInfo{ config, ftn, ILHeader, interpreterMgr };
ret = UnsafeJitFunctionWorker(interpreterMgr, &interpreterJitInfo, nativeCodeVersion, pSizeOfCode);
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/vm/method.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2992,6 +2992,12 @@ class DynamicMethodDesc : public StoredSigMethodDesc
_ASSERTE(IsILStub());
return GetILStubType() == DynamicMethodDesc::StubDelegateShuffleThunk;
}
bool IsAsyncResumeStub() const
{
LIMITED_METHOD_DAC_CONTRACT;
_ASSERTE(IsILStub());
return GetILStubType() == DynamicMethodDesc::StubAsyncResume;
}

// Whether the stub takes a context argument that is an interop MethodDesc.
// See RequiresMDContextArg() for the non-stub version.
Expand Down