From 7b9ab0e196c78968bac455bf29a9845a85e4a022 Mon Sep 17 00:00:00 2001 From: SingleAccretion Date: Sun, 4 Apr 2021 22:40:04 +0300 Subject: [PATCH] Removed must-init requirement for GS Cookies The cookie is always initialized in the prolog, where no user code is allowed. There should be no GC concerns either as the prolog is not interruptible. --- src/coreclr/jit/compiler.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/compiler.hpp b/src/coreclr/jit/compiler.hpp index 9afb2b8c5baa3..0e930ec5c3cfc 100644 --- a/src/coreclr/jit/compiler.hpp +++ b/src/coreclr/jit/compiler.hpp @@ -4181,7 +4181,7 @@ inline void Compiler::CLR_API_Leave(API_ICorJitInfo_Names ename) bool Compiler::fgVarIsNeverZeroInitializedInProlog(unsigned varNum) { LclVarDsc* varDsc = lvaGetDesc(varNum); - bool result = varDsc->lvIsParam || lvaIsOSRLocal(varNum) || (opts.IsOSR() && (varNum == lvaGSSecurityCookie)) || + bool result = varDsc->lvIsParam || lvaIsOSRLocal(varNum) || (varNum == lvaGSSecurityCookie) || (varNum == lvaInlinedPInvokeFrameVar) || (varNum == lvaStubArgumentVar) || (varNum == lvaRetAddrVar); #if FEATURE_FIXED_OUT_ARGS