Skip to content

Commit

Permalink
Removed must-init requirement for GS Cookies (#50702)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SingleAccretion authored Apr 9, 2021
1 parent 950eb6f commit 84d9d6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84d9d6b

Please sign in to comment.