Skip to content

Fix BigInteger hex overflow test on 64-bit runtimes - #138222

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-biginteger-overflow-test
Nov 24, 2026
Merged

tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-biginteger-overflow-test

Conversation

@tannergooding

Copy link
Copy Markdown
Member

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.

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

@tannergooding
tannergooding requested a review from lewing November 24, 2026 19:17
@tannergooding
tannergooding enabled auto-merge (squash) November 24, 2026 19:30
@tannergooding
tannergooding merged commit dec9ca8 into dotnet:main Nov 24, 2026
67 checks passed
@tannergooding
tannergooding deleted the tannergooding-biginteger-overflow-test branch November 24, 2026 22:17
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 25, 2026
@lewing

lewing commented Nov 25, 2026

Copy link
Copy Markdown
Member

/backport to release/11.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigInteger TryParse_VeryLargeNegativeNumber fails on 64-bit since native-width limbs

2 participants