-
-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix[test]: fix a bad bound in decimal fuzzing #3909
fix[test]: fix a bad bound in decimal fuzzing #3909
Conversation
the decimal fuzz test `is_valid` condition was based on an ancient version of decimals which had bounds at -2**127 and 2**127. update the condition to be compatible with the latest version of Decimal. also increase the range of decimals produced by the decimal fuzzing strategy, so that the fuzzer finds overflow issues faster.
some OOB things do not get caught until analysis, so run the analyser.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3909 +/- ##
==========================================
- Coverage 90.93% 88.93% -2.01%
==========================================
Files 95 95
Lines 14388 14391 +3
Branches 3186 3186
==========================================
- Hits 13084 12798 -286
- Misses 904 1133 +229
- Partials 400 460 +60 ☔ View full report in Codecov by Sentry. |
the decimal fuzz test `is_valid` condition was based on an ancient version of decimals which had bounds at `-2**127` and `2**127`. update the condition to be compatible with the latest version of `decimal`. also increase the range of decimals produced by the decimal fuzzing strategy, so that the fuzzer finds overflow issues faster. an additional issue was found in the fuzz tests, which is that some decimal operations panic with `decimal.InvalidOperation` instead of a proper exception. this is a known bug, see GH vyperlang#2241. this fixes the issue by catching the exception and raising an `OverflowException`. misc/refactor: - refactor several uses of quantize into a utility function
fix a fuzz test, fix #2241, improve boundary conditions for some decimal fuzz tests.
What I did
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture