summaryrefslogtreecommitdiff
path: root/packaging/0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch
blob: 4081470380e93ed0a3fdad1ad0bae410365394a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 7cc0b213808a64978e520a91ead790da431c5c9b Mon Sep 17 00:00:00 2001
From: Jonghyun Park <parjong@gmail.com>
Date: Thu, 25 May 2017 02:34:59 +0900
Subject: [PATCH 02/23] [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;
-- 
1.9.1