Skip to content

Conversation

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

@ghost ghost 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
@dotnet-policy-service
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
@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.

6 participants