1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 01:50:53 +09:00

JIT: Don't set patchpoints in methods with CORINFO_DEBUG_CODE (#88227)

In #88199 the debugger is overriding some jit flags, but has left other flags set
that confuse the jit: both `TIER0` and `DEBUG_CODE` end uip set so one part of the jit
used logic appropriate for `TIER0` and another part did not.

The JIT ended up creating a patchpoint for OSR in a method with localloc and this
combination is not supported by OSR and lead to a crash.

Harden the jit so if the runtime asks for debuggable code, the jit will never
generate patchpoints.
This commit is contained in:
Andy Ayers 2023-06-30 18:53:48 -07:00 committed by GitHub
parent 8b7b5efcd2
commit e80ef8638b
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5810,7 +5810,8 @@ void Compiler::impImportBlockCode(BasicBlock* block)
#ifdef FEATURE_ON_STACK_REPLACEMENT
bool enablePatchpoints = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0) && (JitConfig.TC_OnStackReplacement() > 0);
bool enablePatchpoints =
!opts.compDbgCode && opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0) && (JitConfig.TC_OnStackReplacement() > 0);
#ifdef DEBUG