Skip to content

[release/11.0] Fix BigInteger hex overflow test on 64-bit runtimes - #138289

Open
github-actions[bot] wants to merge 1 commit into
release/11.0from
backport/pr-138222-to-release/11.0
Open

github-actions[bot] wants to merge 1 commit into
release/11.0from
backport/pr-138222-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #138222 to release/11.0. Test-only; no product code changes.

/cc @lewing @tannergooding

TryParse_VeryLargeNegativeNumber sized its input for 32-bit limbs, so after BigInteger switched to native-width (nuint) limbs, which release/11.0 also has, the input no longer overflows on 64-bit runtimes. The fix derives the hex digit count from nint.Size.

Fixes #138217

Customer Impact

None; test-only.

Regression

No.

Testing

Clean cherry-pick, not compiled locally; PR CI builds System.Runtime.Numerics.Tests (the test itself is OuterLoop).

Risk

Low; test-only.

`TryParse_VeryLargeNegativeNumber` sized its input for 32-bit limbs, so
the input no longer overflowed on 64-bit runtimes after BigInteger
switched to native-width limbs. Derive the hex digit count from the
native limb width so the existing checks exercise the overflow boundary
on both architectures. No product code changes.

Resolves #138217

> [!NOTE]
> This pull request description was drafted with GitHub Copilot.

Co-authored-by: Copilot App <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Numerics Servicing-approved Approved for servicing release test-bug Problem in test source code (most likely)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants