Fix Unix build break
authorJan Vorlicek <janvorli@microsoft.com>
Fri, 3 Apr 2020 08:56:03 +0000 (10:56 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Fri, 3 Apr 2020 10:17:10 +0000 (03:17 -0700)
src/coreclr/src/vm/threadsuspend.cpp

index 6c91b9a..7a4234a 100644 (file)
@@ -6646,6 +6646,11 @@ void HandleGCSuspensionForInterruptedThread(CONTEXT *interruptedContext)
         if (executionState.m_ppvRetAddrPtr == NULL)
             return;
 
+        void *pvHijackAddr;
+        if (!GetReturnAddressHijackInfo(pThread, &codeInfo, &pvHijackAddr))
+        {
+            return;
+        }
 
         // Calling this turns off the GC_TRIGGERS/THROWS/INJECT_FAULT contract in LoadTypeHandle.
         // We should not trigger any loads for unresolved types.
@@ -6656,7 +6661,6 @@ void HandleGCSuspensionForInterruptedThread(CONTEXT *interruptedContext)
         StackWalkerWalkingThreadHolder threadStackWalking(pThread);
 
         // Hijack the return address to point to the appropriate routine based on the method's return type.
-        void *pvHijackAddr = GetHijackAddr(pThread, &codeInfo);
         pThread->HijackThread(pvHijackAddr, &executionState);
     }
 }