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

Add arithmetic overflow detector and improve unprotected initializer detector #127

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

olegggatttor
Copy link
Contributor

The new detector sees if there are assignments/returns that calculate some arithmetic expressions and if some intermediate calculations
contain a type that is lower than the expected result. Such behavior may lead to unexpected overflow/underflow, e.g., trying to assign the multiplication of two uint48 variables to uint256 would look like uint48 * uint48, and it may overflow (however, the final type would fit such multiplication).

@olegggatttor olegggatttor added the enhancement New feature or request label Feb 8, 2024
@olegggatttor olegggatttor self-assigned this Feb 8, 2024
Copy link
Collaborator

@ndkirillov ndkirillov left a comment

Choose a reason for hiding this comment

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

Appr!

@ndkirillov ndkirillov merged commit 04ba8b3 into develop Feb 12, 2024
2 checks passed
@ndkirillov ndkirillov deleted the add_arithmetic_overflow_detector branch February 12, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants