Skip to content

JIT: fix assert seen in some OSR cases - #68048

Merged
AndyAyersMS merged 2 commits into
dotnet:mainfrom
AndyAyersMS:Fix68003
Apr 15, 2022
Merged

AndyAyersMS merged 2 commits into
dotnet:mainfrom
AndyAyersMS:Fix68003

Conversation

@AndyAyersMS

@AndyAyersMS AndyAyersMS commented Apr 14, 2022 •

Copy link
Copy Markdown
Member

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.
@ghost ghost 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

ghost commented Apr 14, 2022

Copy link
Copy Markdown

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
Copy Markdown
Member Author

/azp run runtime-coreclr jitstress

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS

Copy link
Copy Markdown
Member Author

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

@AndyAyersMS

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr jitstress

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS AndyAyersMS mentioned this pull request Apr 15, 2022
53 of 72 tasks
@AndyAyersMS

Copy link
Copy Markdown
Member Author

@BruceForstall PTAL
cc @dotnet/jit-contrib

@BruceForstall BruceForstall left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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