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

Folded Nodes Are Not Validated #4108

Open
ritzdorf opened this issue Apr 25, 2024 · 0 comments
Open

Folded Nodes Are Not Validated #4108

ritzdorf opened this issue Apr 25, 2024 · 0 comments

Comments

@ritzdorf
Copy link
Contributor

Version Information

  • vyper Version (output of vyper --version OR linkable commit hash vyperlang/vyper@): b43ffac

Issue Description

When some node is folded the folded value is not validated. In the
general case, it is not an issue as the semantic validation phase will
catch the error. However, if the folded value is used in a type
annotation for a String or Byte type, the compiler will not raise.

POC

The following contract compiles although the size in byte of the String
is greater than the maximum value of uint256

x:String[max_value(uint256) + 10]
@cyberthirst cyberthirst transferred this issue from another repository Jun 10, 2024
@charles-cooper charles-cooper transferred this issue from another repository Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant