Skip to content

[release/6.0-rc2] Fix gtCloneExpr when cloning during R2R compilation a GT_ALLOCOBJ node - #59438

Merged
Anipik merged 3 commits into
release/6.0-rc2from
backport/pr-59421-to-release/6.0-rc2
Sep 22, 2021
Merged

[release/6.0-rc2] Fix gtCloneExpr when cloning during R2R compilation a GT_ALLOCOBJ node#59438
Anipik merged 3 commits into
release/6.0-rc2from
backport/pr-59421-to-release/6.0-rc2

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Sep 21, 2021

Copy link
Copy Markdown
Contributor

Backport of #59395 to release/6.0-rc2

/cc @davidwrighton

Customer Impact

  • Without this fix cloned expressions with allocations will fail
  • This is most common in profile guided code around devirtualization, but I believe it can occur in other where gtCloneExpr is used
  • Symptom of the failure is a compilation failure during crossgen2
  • This blocks usage of static PGO technology on larger applications which have code patterns like
localVariable.CallSomeVirtualMethod(new SomeType());

Under conditions I am unable to identify that will sometimes cause the JIT to generate data structures vulnerable to this bug if the type of localVariable can be predicted via PGO.

Testing

Standard PR run + targeted testing of the PGO scenario which failed without this fix.

Risk

Low. This fixes a logic error in the jit that would cause prejitting of a method to fail.

…e - Without this fix cloned expressions with allocations will fail - This is most common in profile guided code around devirtualization, but I believe it can occur in other where gtCloneExpr is used - Symptom of the failure is a compilation failure during crossgen2
@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 21, 2021
@ghost

Copy link
Copy Markdown

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

Issue Details

Backport of #59421 to release/6.0-rc2

/cc @davidwrighton @github-actions[bot]

Customer Impact

Testing

Risk

Author:github-actions[bot]
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@davidwrightondavidwrighton changed the title [release/6.0-rc2] [release/6.0] Fix gtCloneExpr when cloning during R2R compilation a GT_ALLOCOBJ node[release/6.0-rc2] Fix gtCloneExpr when cloning during R2R compilation a GT_ALLOCOBJ nodeSep 21, 2021
@davidwrightondavidwrighton added the Servicing-consider Issue for next servicing release review label Sep 21, 2021
@JulieLeeMSFTJulieLeeMSFT added this to the 6.0.0 milestone Sep 21, 2021

@jeffschwMSFTjeffschwMSFT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved. Please get a code review and we should take for RC2 consideration.

@jeffschwMSFTjeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 22, 2021
@Anipik
Anipik merged commit b700018 into release/6.0-rc2Sep 22, 2021
@jkotas
jkotas deleted the backport/pr-59421-to-release/6.0-rc2 branch September 24, 2021 04:30
@ghostghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@jeffschwMSFT@BruceForstall@Anipik@davidwrighton@JulieLeeMSFT