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/9.0] fix guid version > 7 #108351

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 27, 2024

Backport of #108314 to release/9.0

/cc @tannergooding @kasperk81

Customer Impact

  • Customer reported
  • Found internally

#108267 - Manually creating a GUID where the version is 8 higher will result in an incorrect value being returned.

Regression

  • Yes
  • No

No, this is a net new API in .NET 9

Testing

Explicit validation tests were added. The issue is due to the implicit sign extension that exists. That is, because the underlying field is short and because C# doesn't operate directly on "small" integer types in many scenarios, it implicitly sign extends up to int before the unsigned right shift would occur.

Thus, the code _c >>> 12 could return an incorrect value as -32768 would change from 0x8000 to 0xFFFF_8000 and would become 0x000F_FFF8, rather than 0x8, with similar results happening for any value in the range [-1, -32768].

Risk

Low. This is a net new API in .NET 9.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 27, 2024
@martincostello martincostello added area-System.Runtime and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 28, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

@tannergooding tannergooding added the Servicing-consider Issue for next servicing release review label Sep 30, 2024
@jeffhandley jeffhandley added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 30, 2024
@carlossanlop carlossanlop merged commit 5d276d9 into release/9.0 Oct 16, 2024
149 of 154 checks passed
@carlossanlop carlossanlop deleted the backport/pr-108314-to-release/9.0 branch October 16, 2024 17:15
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants