diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index a1220115fc5130..d2265a064952b7 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -10552,7 +10552,8 @@ class Compiler // Do not stress tailcalls in IL stubs as the runtime creates several IL // stubs to implement the tailcall mechanism, which would then // recursively create more IL stubs. - return !opts.jitFlags->IsSet(JitFlags::JIT_FLAG_IL_STUB) && + // Tailcalls are also not allowed out of async methods, so do not stress in those either. + return !opts.jitFlags->IsSet(JitFlags::JIT_FLAG_IL_STUB) && !compIsAsync() && (JitConfig.TailcallStress() != 0 || compStressCompile(STRESS_TAILCALL, 5)); #else return false;