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

[release/7.0] JIT: Fix segfault for modulo computations involving address-of expressions #76171

Merged
merged 3 commits into from
Sep 28, 2022

Conversation

github-actions[bot]
Copy link
Contributor

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

Backport of #76061 to release/7.0

/cc @jakobbotsch

Customer Impact

Code that computes remainder where an operand is an address-of expression will crash the JIT on arm64 platforms.

For example, the following code crashes during JIT in .NET 7:
https://github.com/VSadov/NonBlocking/blob/e2bd82f6ebe80a81b769d8195aae22e3d2e19441/src/NonBlocking/Counter/CounterBase.cs#L32-L37

Reported by customer in #76051. This is a regression from .NET 6.

Testing

Regression test included.

Risk

Low.

… trees

We may get here for any invariant dividend/divisor but these can be
'complex' address-of trees that gtClone does not handle.

Fix #76051
@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 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 #76061 to release/7.0

/cc @jakobbotsch

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
Member

@jakobbotsch if this is ready, please add the servicing-consider label, post this in the "NET Core Ask mode" channel for visibility, and send email to Tactics requesting approval.

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.

approved. we will take for consideration in 7 ga. please get a code review.

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Sep 26, 2022
@jeffschwMSFT jeffschwMSFT added this to the 7.0.0 milestone Sep 26, 2022
@jakobbotsch jakobbotsch changed the title [release/7.0] JIT: Use gtCloneExpr in fgMorphModToSubMulDiv for potentially complex trees [release/7.0] JIT: Fix segfault for modulo computations involving address-of expressions Sep 28, 2022
@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 28, 2022
@carlossanlop
Copy link
Member

Approved by Tactics, CI is green, signed off. Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit a2058b5 into release/7.0 Sep 28, 2022
@carlossanlop carlossanlop deleted the backport/pr-76061-to-release/7.0 branch September 28, 2022 20:11
@ghost ghost locked as resolved and limited conversation to collaborators Oct 29, 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