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[venom]: fix some sccp evaluations #4028

Merged
merged 8 commits into from
May 20, 2024

Conversation

charles-cooper
Copy link
Member

some sccp operations were not wrapped in wrap_*op, so they could panic on input which is out of range. this commit wraps all the remaining sccp evaluators for well-formedness.

What I did

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

some sccp operations were not wrapped in `wrap_*op`, so they could panic
on input which is out of range. this commit wraps all the remaining sccp
evaluators for well-formedness.
@charles-cooper charles-cooper marked this pull request as ready for review May 16, 2024 17:03
@harkal
Copy link
Collaborator

harkal commented May 17, 2024

The evaluations on the Venom-scape need to raise static compilation error on out of bounds, etc. I think the solution should be in the form of #4013 (sorry I thought I had those commits pushed :( )

Of course the tests need to start accommodating for the compiler to detect those errors at compile time.

What do you think?

@charles-cooper
Copy link
Member Author

The evaluations on the Venom-scape need to raise static compilation error on out of bounds, etc. I think the solution should be in the form of #4013 (sorry I thought I had those commits pushed :( )

Of course the tests need to start accommodating for the compiler to detect those errors at compile time.

What do you think?

i mean in that case we should be consistent across all the eval functions. but anyway i don't think they necessarily indicate an error, it's totally valid to end up with a -2 as argument to shr for example (and i think it can be generated from the frontend, like if you bitcast a literal -2: int256 to a uint256).

@charles-cooper charles-cooper merged commit f4c9946 into vyperlang:master May 20, 2024
153 checks passed
@charles-cooper charles-cooper deleted the fix/sccp-bounds branch May 20, 2024 17:46
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