-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix zero initialization use of "initReg" #58410
Conversation
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsIf the only local is an enregistered must-init struct, The fix is the change the condition to use the actual register No spmi asm diffs. Fixes #57911
|
/azp run runtime-coreclr jitstress |
Azure Pipelines successfully started running 1 pipeline(s). |
@sandreenko This looks like fallout from enregistered struct locals. Is the condition appropriate, or is there some other standard condition that should be used? PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think the fix is correct.
Looks like LclVarDsc::IsFloatRegType
is not prepared for enreg structs, we can change the function or we can delete its usage, there are only 3 callers, 1 you have fixed here, the other 2 are:
runtime/src/coreclr/jit/codegenlinear.cpp
Lines 54 to 55 in de6b1e9
// Is this a floating-point argument? | |
if (varDsc->IsFloatRegType()) |
runtime/src/coreclr/jit/compiler.cpp
Line 2173 in de6b1e9
(varDsc->IsFloatRegType() || !isFloatReg) && (varDsc->lvSlotNum < info.compVarScopesCount)) |
could you please look at them as well?
How about usage of |
You need to use |
f5ff206
to
94b2e9a
Compare
/azp run runtime-coreclr jitstress |
Azure Pipelines successfully started running 1 pipeline(s). |
@sandreenko Can you look at the additional changes in 16a9f78? |
If the only local is an enregistered must-init struct, we were setting `initReg` to its register (in this case, `xmm0`). However, `initReg` is expected to be an integer register. In the test case, with GS cookie stress, the GS cookie code asserted that `initReg` was an integer register, but it wasn't. The fix is the change the condition to use the actual register assigned to the variable (in this case, `xmm0`), not the variable type (here, `TYP_STRUCT`). No spmi asm diffs. Fixes dotnet#57911
94b2e9a
to
d2a8e70
Compare
cc @dotnet/jit-contrib |
If the only local is an enregistered must-init struct,
we were setting
initReg
to its register (in this case,xmm0
).However,
initReg
is expected to be an integer register. In thetest case, with GS cookie stress, the GS cookie code asserted
that
initReg
was an integer register, but it wasn't.The fix is the change the condition to use the actual register
assigned to the variable (in this case,
xmm0
), not the variabletype (here,
TYP_STRUCT
).No spmi asm diffs.
Fixes #57911