Skip to content

Commit

Permalink
[7.0] Fix the tiering delay to account for changing IL/native code ve…
Browse files Browse the repository at this point in the history
…rsions 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
  • Loading branch information
kouvel committed Nov 29, 2022
1 parent d3999cc commit e13ac7a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/coreclr/vm/tieredcompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,10 +593,17 @@ bool TieredCompilationManager::TryDeactivateTieringDelay()
continue;
}

PCODE codeEntryPoint = activeCodeVersion.GetNativeCode();
if (codeEntryPoint == NULL)
{
// The active IL/native code version has changed since the method was queued, and the currently active version
// doesn't have a code entry point yet
continue;
}

EX_TRY
{
bool wasSet =
CallCountingManager::SetCodeEntryPoint(activeCodeVersion, activeCodeVersion.GetNativeCode(), false, nullptr);
bool wasSet = CallCountingManager::SetCodeEntryPoint(activeCodeVersion, codeEntryPoint, false, nullptr);
_ASSERTE(wasSet);
}
EX_CATCH
Expand Down

0 comments on commit e13ac7a

Please sign in to comment.