Fix regression in fat calls (dotnet/coreclr#21446)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Sat, 8 Dec 2018 21:48:06 +0000 (22:48 +0100)
committerGitHub <noreply@github.com>
Sat, 8 Dec 2018 21:48:06 +0000 (22:48 +0100)
This seems to fix an AV in RyuJIT.

Commit migrated from https://github.com/dotnet/coreclr/commit/759116b3db4b0f6e2b4306062f33b517d532217a

src/coreclr/src/jit/indirectcalltransformer.cpp

index 40ea625..85d6d22 100644 (file)
@@ -172,7 +172,6 @@ private:
         //
         virtual void Run()
         {
-            origCall = GetCall(stmt);
             Transform();
         }
 
@@ -281,6 +280,7 @@ private:
             : Transformer(compiler, block, stmt)
         {
             doesReturnValue = stmt->gtStmtExpr->OperIs(GT_ASG);
+            origCall        = GetCall(stmt);
             fptrAddress     = origCall->gtCallAddr;
             pointerType     = fptrAddress->TypeGet();
         }