Skip to content

Commit e13ac7a

Browse files
authored
[7.0] Fix the tiering delay to account for changing IL/native code versions during the delay (#78669)
- Port of #78668 - Added a check to see if the currently active native code version has a code entry point Fixes #77973
1 parent d3999cc commit e13ac7a

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
@@ -593,10 +593,17 @@ bool TieredCompilationManager::TryDeactivateTieringDelay()
593593
continue;
594594
}
595595

596+
PCODE codeEntryPoint = activeCodeVersion.GetNativeCode();
597+
if (codeEntryPoint == NULL)
598+
{
599+
// The active IL/native code version has changed since the method was queued, and the currently active version
600+
// doesn't have a code entry point yet
601+
continue;
602+
}
603+
596604
EX_TRY
597605
{
598-
bool wasSet =
599-
CallCountingManager::SetCodeEntryPoint(activeCodeVersion, activeCodeVersion.GetNativeCode(), false, nullptr);
606+
bool wasSet = CallCountingManager::SetCodeEntryPoint(activeCodeVersion, codeEntryPoint, false, nullptr);
600607
_ASSERTE(wasSet);
601608
}
602609
EX_CATCH

0 commit comments

Comments
 (0)