Skip to content

[release/7.0] JIT: fix incorrect scale in genCreateAddrMode + no-opt - #75560

Merged
carlossanlop merged 9 commits into
release/7.0from
backport/pr-75433-to-release/7.0
Sep 14, 2022
Merged

[release/7.0] JIT: fix incorrect scale in genCreateAddrMode + no-opt#75560
carlossanlop merged 9 commits into
release/7.0from
backport/pr-75433-to-release/7.0

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Sep 13, 2022

Copy link
Copy Markdown
Contributor

Backport of #75433 to release/7.0

/cc @EgorBo

Customer Impact

Fixes a bug where for unoptimized code JIT emits a memory load for e.g. an array with an incorrect offset, e.g.:

array[index * 0 + 1] ends up accessing array[index + 1] instead of array[1] - it's not possible to reproduce this in pure C# because Roslyn folds x * 0 to 0 even in Debug but it can be reproduced with C++/CLI (initially was reported as https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1595540?src=WorkItemMention&src-action=artifact_link) or custom IL.

Testing

Test is added, no impact on existing C# code

Risk

Low

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 13, 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 #75433 to release/7.0

/cc @EgorBo

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:-

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@kunalspathak, please review this 7.0 backporting PR.

@JulieLeeMSFT

Copy link
Copy Markdown
Member

cc @jeffschwMSFT for 7.0 backport.

@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. once we have a code review, a green ci, and the main issue is merged, this can merge.

@carlossanlop

Copy link
Copy Markdown
Contributor

Main issue has been merged. This has been approved, signed off, and CI is green. Ready to merge. :shipit:

@carlossanlop
carlossanlop merged commit 6297d41 into release/7.0Sep 14, 2022
@carlossanlop
carlossanlop deleted the backport/pr-75433-to-release/7.0 branch September 14, 2022 04:11
@ghostghost locked as resolved and limited conversation to collaborators Oct 14, 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 SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@JulieLeeMSFT@carlossanlop@jeffschwMSFT@AndyAyersMS@kunalspathak@EgorBo