diff --git a/src/coreclr/vm/readytoruninfo.cpp b/src/coreclr/vm/readytoruninfo.cpp index a6eb8e6e742e16..5586a9db94202a 100644 --- a/src/coreclr/vm/readytoruninfo.cpp +++ b/src/coreclr/vm/readytoruninfo.cpp @@ -1281,6 +1281,14 @@ PCODE ReadyToRunInfo::GetEntryPoint(MethodDesc * pMD, PrepareCodeConfig* pConfig if (ReadyToRunCodeDisabled()) goto done; + // Return-dropping async thunks are VM-synthesized. They share the same metadata + // token and signature shape as a regular async variant, so the R2R lookup below + // would incorrectly bind the thunk to the non-thunk's compiled code and bypass + // the virtual dispatch the thunk performs. Crossgen2 does not emit R2R code for + // these thunks; fall back to transient IL generation in the prestub. + if (pMD->IsReturnDroppingThunk()) + goto done; + ETW::MethodLog::GetR2RGetEntryPointStart(pMD); uint offset; diff --git a/src/tests/async/covariant-return/covariant-returns.csproj b/src/tests/async/covariant-return/covariant-returns.csproj index 5610ae90aa882c..7548a677889c52 100644 --- a/src/tests/async/covariant-return/covariant-returns.csproj +++ b/src/tests/async/covariant-return/covariant-returns.csproj @@ -1,8 +1,4 @@ - - - false -