Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 0c006a8

Browse files
committed
Make sure to copy over the assembly pointer to the key that's actually stored in the hash table.
1 parent 62cf89f commit 0c006a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vm/custommarshalerinfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ EEHashEntry_t * EECMHelperHashtableHelper::AllocateEntry(EECMHelperHashtableKey
367367
cbEntry += S_SIZE_T(pKey->GetMarshalerTypeNameByteCount());
368368
cbEntry += S_SIZE_T(pKey->GetCookieStringByteCount());
369369
cbEntry += S_SIZE_T(pKey->GetMarshalerInstantiation().GetNumArgs()) * S_SIZE_T(sizeof(LPVOID));
370+
cbEntry += S_SIZE_T(sizeof(LPVOID));
370371

371372
if (cbEntry.IsOverflow())
372373
return NULL;
@@ -387,6 +388,7 @@ EEHashEntry_t * EECMHelperHashtableHelper::AllocateEntry(EECMHelperHashtableKey
387388
memcpy((void*)pEntryKey->m_strCookie, pKey->GetCookieString(), pKey->GetCookieStringByteCount());
388389
memcpy((void*)pEntryKey->m_Instantiation.GetRawArgs(), pKey->GetMarshalerInstantiation().GetRawArgs(),
389390
pEntryKey->m_Instantiation.GetNumArgs() * sizeof(LPVOID));
391+
pEntryKey->m_invokingAssembly = pKey->GetInvokingAssembly();
390392
}
391393
else
392394
{
@@ -401,6 +403,7 @@ EEHashEntry_t * EECMHelperHashtableHelper::AllocateEntry(EECMHelperHashtableKey
401403
pEntryKey->m_cCookieStrBytes = pKey->GetCookieStringByteCount();
402404
pEntryKey->m_strCookie = pKey->GetCookieString();
403405
pEntryKey->m_Instantiation = Instantiation(pKey->GetMarshalerInstantiation());
406+
pEntryKey->m_invokingAssembly = pKey->GetInvokingAssembly();
404407
}
405408

406409
return pEntry;

0 commit comments

Comments
 (0)