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 Vorlicek <janvorli@microsoft.com>2016-10-15 03:14:48 +0300
committerJan Vorlicek <janvorli@microsoft.com>2016-10-15 03:14:48 +0300
commitac86af644210e430abfa081b1540b2f95d66c70b (patch)
tree484eced1fbed6ac20ca1988eeea1c58e6bf4e7dc /src/Native/Runtime/i386
parentdb1ee9611ddb179f88c3f4c5bd47f419c7eabe5f (diff)
This change ensures that the m_pHackInvokeTunnel is not modified on ARM when RhpLoopHijack is called in a call chain of RhpGcStressProbe. This can happen during GC stress when GC calls GCToEEInterface::GcStartWork, which calls RestrictedCallouts::InvokeGcCallouts and that calls managed System::Runtime::InteropServices::RCWWalker.OnGCStarted, where there is a loop with with injected RhpLoopHijack down the call chain.
[tfs-changeset: 1633416]
Diffstat (limited to 'src/Native/Runtime/i386')
-rw-r--r--src/Native/Runtime/i386/GcProbe.asm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Native/Runtime/i386/GcProbe.asm b/src/Native/Runtime/i386/GcProbe.asm
index 96d685ec8..15a2726cb 100644
--- a/src/Native/Runtime/i386/GcProbe.asm
+++ b/src/Native/Runtime/i386/GcProbe.asm
@@ -678,6 +678,8 @@ endif
test dword ptr [edx + OFFSETOF__Thread__m_ThreadStateFlags], TSF_SuppressGcStress + TSF_DoNotTriggerGc
jnz DoneWaitingForGc
+ mov [edx + OFFSETOF__Thread__m_pHackPInvokeTunnel], esp ; esp is address of PInvokeTransitionFrame
+
;;
;; Unhijack this thread, if necessary.
;;
@@ -702,8 +704,6 @@ ifdef FEATURE_GC_STRESS
cmp al, 0
je @F
- mov edx, [esp + OFFSETOF__PInvokeTransitionFrame__m_pThread] ; recover Thread * from Frame
- mov [edx + OFFSETOF__Thread__m_pHackPInvokeTunnel], esp ; esp is address of PInvokeTransitionFrame
mov eax, REDHAWKGCINTERFACE__STRESSGC
call RhpCall
@@: