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

compiler panic when using augassign with lhs and rhs overlap #4489

Open
cyberthirst opened this issue Feb 23, 2025 · 0 comments
Open

compiler panic when using augassign with lhs and rhs overlap #4489

cyberthirst opened this issue Feb 23, 2025 · 0 comments
Labels
bug - type 0 compiler halts or panics instead of generating code

Comments

@cyberthirst
Copy link
Collaborator

cyberthirst commented Feb 23, 2025

#4487 blocks the bug described in GHSA-4w26-8p97-f4jp. however, we should fix the code generator so that it issues proper bounds checks.

example of such valid contract:

a: public(DynArray[uint256, 2])
interface Foo:
    def foo() -> uint256: view
@external
def foo() -> uint256:
    return self.a[1]
@external
def entry() -> DynArray[uint256, 2]:
    self.a = [1, 1]
    # panics due to staticcall
    self.a[1] += staticcall Foo(self).foo()
    return self.a
@cyberthirst cyberthirst added the needs triage needs triage label Feb 23, 2025
@charles-cooper charles-cooper added bug - type 0 compiler halts or panics instead of generating code and removed needs triage needs triage labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - type 0 compiler halts or panics instead of generating code
Projects
None yet
Development

No branches or pull requests

2 participants