diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2018-08-23 02:42:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 02:42:43 +0200 |
commit | 8cd4b39a42c1c7cf37502357e6a4cb2888f5dfd7 (patch) | |
tree | a767facb00becfc9b6b9f0c3a8d731e566e3d1c3 /src/vm/i386 | |
parent | 8013a4b6786d9e6618f8ed36bd0a473aa17b72aa (diff) | |
download | coreclr-8cd4b39a42c1c7cf37502357e6a4cb2888f5dfd7.tar.gz coreclr-8cd4b39a42c1c7cf37502357e6a4cb2888f5dfd7.tar.bz2 coreclr-8cd4b39a42c1c7cf37502357e6a4cb2888f5dfd7.zip |
Enable unloading of AssemblyLoadContext (#18476)
Enable assembly unloading
* Allow PInvoke methods on collectible assemblies
* Fix test unloadability
Several hundreds of tests were using Helper class that created
GCHandle, but never freed it. That prevented unloading of those
tests. The change modifies the Helper class to keep the handle
in a finalizable object.
Several GCHandle related tests were not freeing the GCHandle they
allocated, so this change adds freeing them to enable the unloading.
* Add missing error messages to the resources
* Fix shuffle thunk cache for unloadability
* Add GetLoaderAllocator to ICLRPrivBinder
Diffstat (limited to 'src/vm/i386')
-rw-r--r-- | src/vm/i386/stublinkerx86.cpp | 4 | ||||
-rw-r--r-- | src/vm/i386/stublinkerx86.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vm/i386/stublinkerx86.cpp b/src/vm/i386/stublinkerx86.cpp index 02f3a61c63..ac5006eb8f 100644 --- a/src/vm/i386/stublinkerx86.cpp +++ b/src/vm/i386/stublinkerx86.cpp @@ -6040,6 +6040,7 @@ static void AppendGCLayout(ULONGARRAY &gcLayout, size_t baseOffset, BOOL fIsType } Stub * StubLinkerCPU::CreateTailCallCopyArgsThunk(CORINFO_SIG_INFO * pSig, + MethodDesc* pMD, CorInfoHelperTailCallSpecialHandling flags) { STANDARD_VM_CONTRACT; @@ -6429,7 +6430,8 @@ Stub * StubLinkerCPU::CreateTailCallCopyArgsThunk(CORINFO_SIG_INFO * pSig, EncodeGCOffsets(pSl, gcLayout); } - return pSl->Link(); + LoaderHeap* pHeap = pMD->GetLoaderAllocatorForCode()->GetStubHeap(); + return pSl->Link(pHeap); } #endif // DACCESS_COMPILE diff --git a/src/vm/i386/stublinkerx86.h b/src/vm/i386/stublinkerx86.h index 55ba942920..44bfc79fd2 100644 --- a/src/vm/i386/stublinkerx86.h +++ b/src/vm/i386/stublinkerx86.h @@ -437,6 +437,7 @@ class StubLinkerCPU : public StubLinker #ifdef _TARGET_AMD64_ static Stub * CreateTailCallCopyArgsThunk(CORINFO_SIG_INFO * pSig, + MethodDesc* pMD, CorInfoHelperTailCallSpecialHandling flags); #endif // _TARGET_AMD64_ |