Skip to content

Commit

Permalink
Revert "Fix ShuffleThunk cache heap (#105480)"
Browse files Browse the repository at this point in the history
This reverts commit 81976ed.
  • Loading branch information
jkotas committed Aug 9, 2024
1 parent 5ac6955 commit 3b41086
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/coreclr/vm/loaderallocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,11 @@ void AssemblyLoaderAllocator::Init(AppDomain* pAppDomain)
LoaderAllocator::Init((BaseDomain *)pAppDomain);
if (IsCollectible())
{
m_pShuffleThunkCache = new ShuffleThunkCache(m_pStubHeap);
// TODO: the ShuffleThunkCache should really be using the m_pStubHeap, however the unloadability support
// doesn't track the stubs or the related delegate classes and so we get crashes when a stub is used after
// the AssemblyLoaderAllocator is gone (the stub memory is unmapped).
// https://github.com/dotnet/runtime/issues/55697 tracks this issue.
m_pShuffleThunkCache = new ShuffleThunkCache(SystemDomain::GetGlobalLoaderAllocator()->GetExecutableHeap());
}
}

Expand Down

0 comments on commit 3b41086

Please sign in to comment.