From 7cc0b213808a64978e520a91ead790da431c5c9b Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Thu, 25 May 2017 02:34:59 +0900 Subject: [PATCH 02/29] [x86/Linux] Thread-safe UMThunkMarshInfo::RunTimeInit (#11864) --- src/vm/dllimportcallback.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vm/dllimportcallback.cpp b/src/vm/dllimportcallback.cpp index c70d52d..90c01a4 100644 --- a/src/vm/dllimportcallback.cpp +++ b/src/vm/dllimportcallback.cpp @@ -1382,9 +1382,9 @@ VOID UMThunkMarshInfo::RunTimeInit() UINT16 cbRetPop = 0; // - // m_cbStackArgSize represents the number of arg bytes for the MANAGED signature + // cbStackArgSize represents the number of arg bytes for the MANAGED signature // - m_cbStackArgSize = 0; + UINT32 cbStackArgSize = 0; int offs = 0; @@ -1410,9 +1410,10 @@ VOID UMThunkMarshInfo::RunTimeInit() else { offs += StackElemSize(cbSize); - m_cbStackArgSize += StackElemSize(cbSize); + cbStackArgSize += StackElemSize(cbSize); } } + m_cbStackArgSize = cbStackArgSize; m_cbActualArgSize = (pStubMD != NULL) ? pStubMD->AsDynamicMethodDesc()->GetNativeStackArgSize() : offs; PInvokeStaticSigInfo sigInfo; -- 2.7.4