Skip to content

[release/7.0] Preserve last error for patchpoint helpers #76200

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

Merged
merged 3 commits into from
Sep 27, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 26, 2022

Backport of #75922 to release/7.0

Original issue Fixes #75828.

/cc @AndyAyersMS

Customer Impact

Some applications that rely on proper last error values may fail when run on .NET 7, because of jit-inserted calls to the patchpoint helper. Proper diagnosis of this failure may be difficult for customers.

Regression

Yes, this helper is used by OSR (On Stack Replacement) which is newly enabled in .NET 7.

Testing

Normal CI testing, plus additional libraries-pgo testing (where bug was first uncoverd), plus new test added.

Risk

Low, the fix preserves last error in the patchpoint helper, similar to what is done in many other runtime entry points.

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

In stress modes (and eventually perhaps in normal uses) the jit may insert
patchpoint helper calls in regions where last error is live. So the helpers
need to preserve last error.

Because some invocations of the helpers may transition to OSR methods instead
of returning, we can't use the normal macros for this.

Fixes #75828.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 26, 2022
@ghost
Copy link

ghost commented Sep 26, 2022

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

Issue Details

Backport of #75922 to release/7.0

/cc @AndyAyersMS

Customer Impact

Testing

Risk

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

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

area-CodeGen-coreclr

Milestone: -

@carlossanlop
Copy link
Contributor

@AndyAyersMS if this is ready, please add the servicing-consider label, then send an approval request email to Tactics.

@AndyAyersMS AndyAyersMS added the Servicing-consider Issue for next servicing release review label Sep 26, 2022
@AndyAyersMS AndyAyersMS added this to the 7.0.0 milestone Sep 26, 2022
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

approve. we will take for consideration in 7 ga

@JulieLeeMSFT JulieLeeMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 26, 2022
@JulieLeeMSFT
Copy link
Member

@carlossanlop this is approved from tactics.

@carlossanlop carlossanlop merged commit 1d709c9 into release/7.0 Sep 27, 2022
@carlossanlop carlossanlop deleted the backport/pr-75922-to-release/7.0 branch September 27, 2022 16:40
@ghost ghost locked as resolved and limited conversation to collaborators Oct 27, 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 Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants