Repository navigation
Add signed add overflow elimination coverage - #941
augmentcode[bot] wants to merge 2 commits into
Conversation
|
👋 I've got this PR. I'll handle review feedback, CI failures, and merge conflicts, and ping you the moment it's ready for review. Drop a comment anytime. Marking it ready and picking reviewers are your call — I'll leave both alone. |
| %y_in = source | ||
| %x = mod %x_in, {bound + 1} | ||
| %y = mod %y_in, {bound + 1} | ||
| %res = add %x, %y |
There was a problem hiding this comment.
The test name test_no_eliminate_signed_add_overflow_crossing_sign_boundary suggests testing addition across positive/negative boundaries, but mod produces only non-negative values [0, 2^254], so both x and y are non-negative and slt %y, 0 is always false; the test actually validates that the pass correctly rejects elimination when max(x) + max(y) > SIGNED_MAX (2^255 > 2^255-1), not sign-boundary crossing.
Severity: low
🤖 Was this useful? React with 👍 or 👎
There was a problem hiding this comment.
Good catch — I renamed the test to test_no_eliminate_signed_add_overflow_exceeding_signed_max and updated the docstring to match what the setup is actually proving in a2bdf9a.
|
This PR appears to be inactive. The agent will stop monitoring until a new comment is posted. |
Problem
safeaddhad no overflow-elimination coverage, so we weren't exercising the VRA-proven-safe path or the sign-boundary guard.Solution
OverflowEliminationPassto recognize the signedeq(slt(y, 0), slt(add(x, y), x))check and add unit coverage for both elimination and non-elimination.Misc
github-apiwas unavailable, so this PR was opened viagithub-app-api.Pull Request opened by Augment Code | View session