summaryrefslogtreecommitdiff
path: root/src/vm/ceeload.cpp
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2018-11-28 06:36:59 +0100
committerJan Kotas <jkotas@microsoft.com>2018-11-27 21:36:59 -0800
commit8aa0869eb9153429091fdba49469d89ec33092cb (patch)
tree8d9caeb728ba245c9e311cd411e59aab9a21d30f /src/vm/ceeload.cpp
parentc7c166e33c807d938367d0364850fe7af1c7b835 (diff)
downloadcoreclr-8aa0869eb9153429091fdba49469d89ec33092cb.tar.gz
coreclr-8aa0869eb9153429091fdba49469d89ec33092cb.tar.bz2
coreclr-8aa0869eb9153429091fdba49469d89ec33092cb.zip
Fix ILStubCache allocation for collectible assemblies (#21188)
The ILStubCache was being allocated per domain unless the domain was a compilation AppDomain. This is wrong for collectible assemblies, since after an assembly is collected, the cache keeps stale entries referring to already deleted MethodTables. The fix is to make ILStubChange per LoaderAllocator instead (and keep the per module instances for compilation AppDomain).
Diffstat (limited to 'src/vm/ceeload.cpp')
-rw-r--r--src/vm/ceeload.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp
index 9124013fa7..9f3c709b58 100644
--- a/src/vm/ceeload.cpp
+++ b/src/vm/ceeload.cpp
@@ -4076,10 +4076,10 @@ ILStubCache* Module::GetILStubCache()
}
CONTRACTL_END;
- // Use per-AD cache for domain specific modules when not NGENing
+ // Use per-LoaderAllocator cache for modules when not NGENing
BaseDomain *pDomain = GetDomain();
if (!IsSystem() && !pDomain->IsSharedDomain() && !pDomain->AsAppDomain()->IsCompilationDomain())
- return pDomain->AsAppDomain()->GetILStubCache();
+ return GetLoaderAllocator()->GetILStubCache();
if (m_pILStubCache == NULL)
{