Skip to content
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

JIT: fix assert seen in some OSR cases #68048

Merged
merged 2 commits into from
Apr 15, 2022
Merged

Conversation

AndyAyersMS
Copy link
Member

@AndyAyersMS AndyAyersMS commented Apr 14, 2022

As a result of #67884, OSR compilations were looking at data in the
gsShadowVarInfo array in cases where it was not initialized.

Fix is to null out gsShadowVarInfo array if there are no shadowed params.

Fixes #68003.

As a result of dotnet#67884, OSR compilations were looking at data in the
`gsShadowVarInfo` array in cases where it was not initialized.

Fix is to defer allocating the `gsShadowVarInfo` array until it's certain
it will be initialized.

Fixes dotnet#68003.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 14, 2022
@ghost ghost assigned AndyAyersMS Apr 14, 2022
@ghost
Copy link

ghost commented Apr 14, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

As a result of #67884, OSR compilations were looking at data in the
gsShadowVarInfo array in cases where it was not initialized.

Fix is to defer allocating the gsShadowVarInfo array until it's certain
it will be initialized.

Fixes #68003.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

/azp run runtime-coreclr jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Member Author

Got an OSX repro, finally. The proposed fix above is not fixing the assert.

@AndyAyersMS
Copy link
Member Author

/azp run runtime-coreclr jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Member Author

@BruceForstall PTAL
cc @dotnet/jit-contrib

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Compiler::optCopyPropPushDef() was also potentially reading an uninitialized shadowCopy field?

@AndyAyersMS
Copy link
Member Author

Looks like Compiler::optCopyPropPushDef() was also potentially reading an uninitialized shadowCopy field?

Yeah, I think it was... odd that that did not lead to any observable problem.

@AndyAyersMS AndyAyersMS merged commit 68dc27a into dotnet:main Apr 15, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure JIT\\opt\\OSR\\largefuncletframe\\largefuncletframe.cmd
2 participants