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

Commit fd724ba

Browse files
author
Fadi Hanna
committed
Add FlushProcessWriteBuffers
1 parent d379d9e commit fd724ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vm/genericdict.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ BOOL DictionaryLayout::FindToken(MethodTable* pMT,
338338
// can start using newly added dictionary layout slots on types where the PerInstInfo hasn't expanded yet, and cause runtime failures.
339339
pMT->GetClass()->SetDictionaryLayout(pNewLayout);
340340

341+
// Ensure no other thread uses old dictionary pointers
342+
FlushProcessWriteBuffers();
343+
341344
return TRUE;
342345
#else
343346
pResult->signature = pSigBuilder == NULL ? pSig : CreateSignatureWithSlotData(pSigBuilder, pAllocator, 0);
@@ -394,6 +397,9 @@ BOOL DictionaryLayout::FindToken(MethodDesc* pMD,
394397
// can start using newly added dictionary layout slots on methods where the PerInstInfo hasn't expanded yet, and cause runtime failures.
395398
pMD->AsInstantiatedMethodDesc()->IMD_SetDictionaryLayout(pNewLayout);
396399

400+
// Ensure no other thread uses old dictionary pointers
401+
FlushProcessWriteBuffers();
402+
397403
return TRUE;
398404
#else
399405
pResult->signature = pSigBuilder == NULL ? pSig : CreateSignatureWithSlotData(pSigBuilder, pAllocator, 0);

0 commit comments

Comments
 (0)