From 7e4eb70393ee199d8db0e81be22fb731f5718b0c Mon Sep 17 00:00:00 2001 From: Pat Gavlin Date: Wed, 23 Aug 2017 13:31:39 -0700 Subject: [PATCH] Type `lea [this + delegateObject]` as `TYP_BYREF`. This node was incorrectly typed as `TYP_GCREF`, which was causing an assertion during GC stress in internal testing. Fixes VSO 482577. Commit migrated from https://github.com/dotnet/coreclr/commit/6025fd00f0c86359817d5b09470120c177e4a124 --- src/coreclr/src/jit/lower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/src/jit/lower.cpp b/src/coreclr/src/jit/lower.cpp index 1b1df60..d137297 100644 --- a/src/coreclr/src/jit/lower.cpp +++ b/src/coreclr/src/jit/lower.cpp @@ -2795,7 +2795,7 @@ GenTree* Lowering::LowerDelegateInvoke(GenTreeCall* call) // [originalThis + offsetOfDelegateInstance] GenTree* newThisAddr = new (comp, GT_LEA) - GenTreeAddrMode(TYP_REF, thisExpr, nullptr, 0, comp->eeGetEEInfo()->offsetOfDelegateInstance); + GenTreeAddrMode(TYP_BYREF, thisExpr, nullptr, 0, comp->eeGetEEInfo()->offsetOfDelegateInstance); GenTree* newThis = comp->gtNewOperNode(GT_IND, TYP_REF, newThisAddr); -- 2.7.4