Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-08-09 17:52:19 +0300
committerGitHub <noreply@github.com>2018-08-09 17:52:19 +0300
commit23201e12defae74bfca95818e8930a731186cd44 (patch)
tree4395d2441b7ccfcc55d6c8f2945356ea948a7a81 /src/Native
parent5bed31924abf08f5c62b63b7edab57983ab96e7a (diff)
parentaa421b97d0ffdd5ee245de63ce410b4c50c37671 (diff)
Merge pull request #6193 from dotnet/nmirror
Merge nmirror to master
Diffstat (limited to 'src/Native')
-rw-r--r--src/Native/Runtime/amd64/ExceptionHandling.S1
-rw-r--r--src/Native/Runtime/amd64/ExceptionHandling.asm1
-rw-r--r--src/Native/Runtime/arm/ExceptionHandling.S1
-rw-r--r--src/Native/Runtime/arm/ExceptionHandling.asm1
-rw-r--r--src/Native/Runtime/arm64/ExceptionHandling.asm1
-rw-r--r--src/Native/Runtime/i386/ExceptionHandling.asm1
-rw-r--r--src/Native/Runtime/thread.h4
7 files changed, 9 insertions, 1 deletions
diff --git a/src/Native/Runtime/amd64/ExceptionHandling.S b/src/Native/Runtime/amd64/ExceptionHandling.S
index fcf4dfbda..fa80c26ad 100644
--- a/src/Native/Runtime/amd64/ExceptionHandling.S
+++ b/src/Native/Runtime/amd64/ExceptionHandling.S
@@ -207,6 +207,7 @@ NESTED_ENTRY RhpRethrow, _TEXT, NoHandler
mov [rsi + OFFSETOF__ExInfo__m_exception], rdx // init the exception object to null
mov byte ptr [rsi + OFFSETOF__ExInfo__m_passNumber], 1 // init to the first pass
mov dword ptr [rsi + OFFSETOF__ExInfo__m_idxCurClause], 0xFFFFFFFF
+ mov byte ptr [rsi + OFFSETOF__ExInfo__m_kind], 0 // init to a deterministic value (ExKind.None)
// link the ExInfo into the thread's ExInfo chain
diff --git a/src/Native/Runtime/amd64/ExceptionHandling.asm b/src/Native/Runtime/amd64/ExceptionHandling.asm
index 566dad71f..b8727fc84 100644
--- a/src/Native/Runtime/amd64/ExceptionHandling.asm
+++ b/src/Native/Runtime/amd64/ExceptionHandling.asm
@@ -254,6 +254,7 @@ NESTED_ENTRY RhpRethrow, _TEXT
mov [rdx + OFFSETOF__ExInfo__m_exception], r8 ;; init the exception object to null
mov byte ptr [rdx + OFFSETOF__ExInfo__m_passNumber], 1 ;; init to the first pass
mov dword ptr [rdx + OFFSETOF__ExInfo__m_idxCurClause], 0FFFFFFFFh
+ mov byte ptr [rdx + OFFSETOF__ExInfo__m_kind], 0 ;; init to a deterministic value (ExKind.None)
;; link the ExInfo into the thread's ExInfo chain
diff --git a/src/Native/Runtime/arm/ExceptionHandling.S b/src/Native/Runtime/arm/ExceptionHandling.S
index 19642c47d..3037905be 100644
--- a/src/Native/Runtime/arm/ExceptionHandling.S
+++ b/src/Native/Runtime/arm/ExceptionHandling.S
@@ -206,6 +206,7 @@ NESTED_ENTRY RhpRethrow, _TEXT, NoHandler
mov r3, #0
str r3, [r1, #OFFSETOF__ExInfo__m_exception] // init the exception object to null
+ strb r3, [r1, #OFFSETOF__ExInfo__m_kind] // init to a deterministic value (ExKind.None)
mov r3, #0xFFFFFFFF
str r3, [r1, #OFFSETOF__ExInfo__m_idxCurClause]
diff --git a/src/Native/Runtime/arm/ExceptionHandling.asm b/src/Native/Runtime/arm/ExceptionHandling.asm
index bf21df089..39c29992a 100644
--- a/src/Native/Runtime/arm/ExceptionHandling.asm
+++ b/src/Native/Runtime/arm/ExceptionHandling.asm
@@ -211,6 +211,7 @@ NotHijacked
add r1, sp, #rsp_offsetof_ExInfo ;; r1 <- ExInfo*
mov r3, #0
str r3, [r1, #OFFSETOF__ExInfo__m_exception] ;; pExInfo->m_exception = null
+ strb r3, [r1, #OFFSETOF__ExInfo__m_kind] ;; init to a deterministic value (ExKind.None)
mov r3, #1
strb r3, [r1, #OFFSETOF__ExInfo__m_passNumber] ;; pExInfo->m_passNumber = 1
mov r3, #0xFFFFFFFF
diff --git a/src/Native/Runtime/arm64/ExceptionHandling.asm b/src/Native/Runtime/arm64/ExceptionHandling.asm
index 35843afee..40d80ffa2 100644
--- a/src/Native/Runtime/arm64/ExceptionHandling.asm
+++ b/src/Native/Runtime/arm64/ExceptionHandling.asm
@@ -360,6 +360,7 @@ NotHijacked
add x1, sp, #rsp_offsetof_ExInfo ;; x1 <- ExInfo*
str xzr, [x1, #OFFSETOF__ExInfo__m_exception] ;; pExInfo->m_exception = null
+ strb xzr, [x1, #OFFSETOF__ExInfo__m_kind] ;; init to a deterministic value (ExKind.None)
mov w3, #1
strb w3, [x1, #OFFSETOF__ExInfo__m_passNumber] ;; pExInfo->m_passNumber = 1
mov w3, #0xFFFFFFFF
diff --git a/src/Native/Runtime/i386/ExceptionHandling.asm b/src/Native/Runtime/i386/ExceptionHandling.asm
index 270cb2330..1981279ab 100644
--- a/src/Native/Runtime/i386/ExceptionHandling.asm
+++ b/src/Native/Runtime/i386/ExceptionHandling.asm
@@ -207,6 +207,7 @@ FASTCALL_FUNC RhpRethrow, 0
mov [edx + OFFSETOF__ExInfo__m_exception], esi ;; init the exception object to null
mov byte ptr [edx + OFFSETOF__ExInfo__m_passNumber], 1 ;; init to the first pass
mov dword ptr [edx + OFFSETOF__ExInfo__m_idxCurClause], 0FFFFFFFFh
+ mov byte ptr [edx + OFFSETOF__ExInfo__m_kind], 0 ;; init to a deterministic value (ExKind.None)
;; link the ExInfo into the thread's ExInfo chain
mov ecx, [eax + OFFSETOF__Thread__m_pExInfoStackHead] ;; ecx <- currently active ExInfo
diff --git a/src/Native/Runtime/thread.h b/src/Native/Runtime/thread.h
index c3934c823..b2143c75d 100644
--- a/src/Native/Runtime/thread.h
+++ b/src/Native/Runtime/thread.h
@@ -46,7 +46,9 @@ struct ExInfo;
typedef DPTR(ExInfo) PTR_ExInfo;
-// also defined in ExceptionHandling.cs, layouts must match
+// Also defined in ExceptionHandling.cs, layouts must match.
+// When adding new fields to this struct, ensure they get properly initialized in the exception handling
+// assembly stubs
struct ExInfo
{