Skip to content
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

Avoid overflow on sqrt of Decimal upper bound #1679

Merged
merged 2 commits into from Nov 5, 2019

Conversation

@iamdefinitelyahuman
Copy link
Contributor

iamdefinitelyahuman commented Nov 5, 2019

What I did

  • Fixed an overflow when attempting to calculate the sqrt of 2**127

How I did it

vyper/functions/functions.py line 1213, divide before adding.

How to verify it

Run the tests. I've added a new test case to specifically check the upper and lower bounds, as this was discovered by fuzzing.

Description for the changelog

  • Bugfix: sqrt overflow on upper bound of Decimal

Cute Animal Picture

image

Copy link
Collaborator

jacqueswww left a comment

Cool to see latent fuzzy kicking in :)

@fubuloubu fubuloubu merged commit 181c70d into vyperlang:master Nov 5, 2019
3 checks passed
3 checks passed
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: py36-core Your tests passed on CircleCI!
Details
ci/circleci: py37-core Your tests passed on CircleCI!
Details
@fubuloubu fubuloubu mentioned this pull request Nov 6, 2019
@iamdefinitelyahuman iamdefinitelyahuman deleted the iamdefinitelyahuman:sqrt-maxnum branch Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.