Skip to content

Commit b2c0e89

Browse files
authored
Fix missing cleanup of cached last used code heap (#119204)
* Fix missing cleanup of cached last used code heap I've started to hit a problem with the interpreter when a CodeHeap pointer obtained from the m_pLastUsedInterpreterDynamicCodeHeap was invalid. This issue is that we were missing cleanup of that cached code heap pointer when the code heap was destroyed. This change adds the cleanup in the same way it is done for non-interpreter dynamic code heap. * Add forgotten ifdef
1 parent 09e6ddd commit b2c0e89

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/coreclr/vm/codeman.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3541,7 +3541,12 @@ void EECodeGenManager::RemoveCodeHeapFromDomainList(CodeHeap *pHeap, LoaderAlloc
35413541
{
35423542
pAllocator->m_pLastUsedDynamicCodeHeap = NULL;
35433543
}
3544-
3544+
#ifdef FEATURE_INTERPRETER
3545+
if (pAllocator->m_pLastUsedInterpreterDynamicCodeHeap == ((void *) pHeapList))
3546+
{
3547+
pAllocator->m_pLastUsedInterpreterDynamicCodeHeap = NULL;
3548+
}
3549+
#endif // FEATURE_INTERPRETER
35453550
break;
35463551
}
35473552
}

0 commit comments

Comments
 (0)