From: Hyeongseok Oh Date: Tue, 24 Oct 2017 07:36:04 +0000 (+0900) Subject: Fix callee argument count bug in fgCanFastTailCall X-Git-Tag: accepted/tizen/base/20180629.140029~781^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1596287ad5c994d5ea76aba90066d408d2a965fa;p=platform%2Fupstream%2Fcoreclr.git Fix callee argument count bug in fgCanFastTailCall Fix bug when callee uses return buffer: return buffer argument is already generated in callee->gtCallArgs on import phase So we should not increment calleeArgRegCount explicitly. --- diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 42c5a2a..81b25ec 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -7295,7 +7295,7 @@ bool Compiler::fgCanFastTailCall(GenTreeCall* callee) if (callee->HasRetBufArg()) // RetBuf { - ++calleeArgRegCount; + // We don't increment calleeArgRegCount here, since it is already in callee->gtCallArgs. // If callee has RetBuf param, caller too must have it. // Otherwise go the slow route.