diff --git a/src/coreclr/vm/loaderallocator.cpp b/src/coreclr/vm/loaderallocator.cpp index 6cc8b62480a00..93868817b47f6 100644 --- a/src/coreclr/vm/loaderallocator.cpp +++ b/src/coreclr/vm/loaderallocator.cpp @@ -1734,11 +1734,7 @@ void AssemblyLoaderAllocator::Init(AppDomain* pAppDomain) LoaderAllocator::Init((BaseDomain *)pAppDomain); if (IsCollectible()) { - // 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()); + m_pShuffleThunkCache = new ShuffleThunkCache(m_pStubHeap); } }