Skip to content

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

Merged
carlossanlop merged 3 commits into
release/7.0from
backport/pr-76061-to-release/7.0
Sep 28, 2022
Merged

[release/7.0] JIT: Fix segfault for modulo computations involving address-of expressions#76171
carlossanlop merged 3 commits into
release/7.0from
backport/pr-76061-to-release/7.0

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Sep 26, 2022

Copy link
Copy Markdown
Contributor

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

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

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

@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. we will take for consideration in 7 ga. please get a code review.

@jeffschwMSFTjeffschwMSFT added the Servicing-consider Issue for next servicing release review label Sep 26, 2022
@jeffschwMSFTjeffschwMSFT added this to the 7.0.0 milestone Sep 26, 2022
@jakobbotschjakobbotsch 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 expressionsSep 28, 2022
@jeffschwMSFTjeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 28, 2022
@carlossanlop

Copy link
Copy Markdown
Contributor

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

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

@carlossanlop@EgorBo@jeffschwMSFT@AndyAyersMS@jakobbotsch