Skip to content

Commit 35c69cf

Browse files
janvorlidirecthex
authored andcommitted
Fix ShuffleThunk cache heap (#105480)
There was a problem with using heap from the related LoaderAllocator for shuffle thunk cache heap. I have tested it again and it seems that the issue is gone. So I am removing the workaround, making the cache use LoaderAllocator local heap. Close #55697
1 parent 9248da8 commit 35c69cf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/coreclr/vm/loaderallocator.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,11 +1734,7 @@ void AssemblyLoaderAllocator::Init(AppDomain* pAppDomain)
17341734
LoaderAllocator::Init((BaseDomain *)pAppDomain);
17351735
if (IsCollectible())
17361736
{
1737-
// TODO: the ShuffleThunkCache should really be using the m_pStubHeap, however the unloadability support
1738-
// doesn't track the stubs or the related delegate classes and so we get crashes when a stub is used after
1739-
// the AssemblyLoaderAllocator is gone (the stub memory is unmapped).
1740-
// https://github.com/dotnet/runtime/issues/55697 tracks this issue.
1741-
m_pShuffleThunkCache = new ShuffleThunkCache(SystemDomain::GetGlobalLoaderAllocator()->GetExecutableHeap());
1737+
m_pShuffleThunkCache = new ShuffleThunkCache(m_pStubHeap);
17421738
}
17431739
}
17441740

0 commit comments

Comments
 (0)