Skip to content

Preserve checked overflow for unsigned range additions#130435

Draft
EgorBo with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-overflow-check-optimization
Draft

Preserve checked overflow for unsigned range additions#130435
EgorBo with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-overflow-check-optimization

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Tier 1 assertion propagation could incorrectly remove an unsigned addition’s overflow check because JIT ranges use signed intervals.

  • Range analysis

    • Reject unsigned ranges that straddle signed zero.
    • Require sums to remain representable by the signed range model.
  • Regression coverage

    • Cover the reported checked-addition failure and sign-straddling ranges.

Copilot AI requested review from Copilot and removed request for Copilot July 9, 2026 21:20
Copilot AI linked an issue Jul 9, 2026 that may be closed by this pull request
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot July 9, 2026 21:48
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot July 9, 2026 21:57
Copilot AI changed the title [WIP] Fix overflow check being optimized out in Test method Preserve checked overflow for unsigned range additions Jul 9, 2026
Copilot finished work on behalf of EgorBo July 9, 2026 22:02
Copilot AI requested a review from EgorBo July 9, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Bug: overflow check is optimized out

2 participants