-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
OSR failure in System.Text.Json.Tests #67152
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json Issue Detailsx64 Ubuntu
Via
|
Ok, I think I know what's going wrong. We have an independently promoted struct with some byte sized fields. OSR decides it should live on the Tier0 frame. But elseswhere in the jit (notably LSRA) we assume independently promoted fields are register sized.
We end up having to spill
and this clobber causes the errors we see at runtime. Possible options for a fix: |
One possible workaround: @@ -1536,6 +1536,13 @@ bool LinearScan::isRegCandidate(LclVarDsc* varDsc)
return false;
}
+ // Don't enregister small promoted struct fields for OSR locals.
+ //
+ if (varTypeIsSmall(varDsc->lvType) && varDsc->lvIsStructField && compiler->lvaIsOSRLocal(lclNum))
+ {
+ return false;
+ }
+ |
This bit of related code is confusing as the comment and code no longer match (consequence of #52039). We used to use the declared type for the local here, not the stack type. This widens the store to runtime/src/coreclr/jit/codegenlinear.cpp Lines 888 to 893 in e961b10
|
Fix two cases where small enregisterable locals can't be saved to the stack using actual (widened) types: * small memory args for OSX ARM64 * promoted fields of OSR locals Closes dotnet#67152. Closes dotnet#67188.
Looks like this might have been hit again in rolling build 1874165, but it's on arm (
|
There is no OSR for arm so it's likely a different issue. |
Made a new issue: #72100 |
x64 Ubuntu
Via
COMPlus_JitEnablePatchpointRange
I have isolated this down toThe text was updated successfully, but these errors were encountered: