Skip to content

Commit 722745e

Browse files
authored
Fix the tiering delay to account for changing IL/native code versions during the delay (#78668)
- Added a check to see if the currently active native code version has a code entry point Fixes #77973
1 parent ce06592 commit 722745e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/coreclr/vm/tieredcompilation.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,17 @@ bool TieredCompilationManager::TryDeactivateTieringDelay()
639639
continue;
640640
}
641641

642+
PCODE codeEntryPoint = activeCodeVersion.GetNativeCode();
643+
if (codeEntryPoint == NULL)
644+
{
645+
// The active IL/native code version has changed since the method was queued, and the currently active version
646+
// doesn't have a code entry point yet
647+
continue;
648+
}
649+
642650
EX_TRY
643651
{
644-
bool wasSet =
645-
CallCountingManager::SetCodeEntryPoint(activeCodeVersion, activeCodeVersion.GetNativeCode(), false, nullptr);
652+
bool wasSet = CallCountingManager::SetCodeEntryPoint(activeCodeVersion, codeEntryPoint, false, nullptr);
646653
_ASSERTE(wasSet);
647654
}
648655
EX_CATCH

0 commit comments

Comments
 (0)