[release/5.0] Backport Fix for Issue 46529 incorrect 64-bit shift result with cast to int#47741
Merged
Anipik merged 2 commits intodotnet:release/5.0from Feb 10, 2021
Merged
Conversation
Fix for 46529 - Unexpected behaviour of ulong -> int cast
Member
|
@briansull can you move the template from the issue into the PR? We only consider PRs and not issues when doing servicing reviews. Please ensure to get a CR for this change. |
Contributor
Author
|
@jeffschwMSFT Updated |
jeffschwMSFT
approved these changes
Feb 8, 2021
Member
jeffschwMSFT
left a comment
There was a problem hiding this comment.
Approved. We will take for consideration for 5.0.x
Contributor
Author
|
Posted the fix for [release/3.1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Incorrect behavior a 64-bit long with shift of 32 or more combined with a cast to int
The JIT generates incorrect code for this code pattern:
(int) (X << C)where C >= 32 and
and X is anything with a potential side-effect and is 64-bit integer type
Customer Impact
Reported by customer who was migrating to .Net Core from the Desktop runtime.
Regression?
This is a regression that was introduced in the .Net 3.X timeframe by
dotnet/coreclr#19899
Testing
SuperPMI, new unit test, CLR outerloop, asm diffs.
Risk
Low
Fixes issue #47724