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

fix(pool-args): saturating_mul max sizes to avoid overflow #12350

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

hai-rise
Copy link
Contributor

@hai-rise hai-rise commented Nov 6, 2024

Currently passing in 17592186044416 would panic on debug and overflow to 0 on release 64bit builds. We can also panic in release, but I guess someone going that high would accept the implicit behaviour of setting to the max usize.

Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this seems reasonable

@Rjected Rjected added this pull request to the merge queue Nov 6, 2024
Merged via the queue into paradigmxyz:main with commit dc0a600 Nov 6, 2024
41 checks passed
@hai-rise hai-rise deleted the saturate-mul branch November 7, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants