Skip to content

Commit

Permalink
add missing test
Browse files Browse the repository at this point in the history
should have been added in 68da04b but the file was not committed
  • Loading branch information
charles-cooper committed Oct 19, 2023
1 parent 5482bbc commit 06c4380
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/parser/features/test_memory_alloc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pytest

from vyper.compiler import compile_code
from vyper.exceptions import MemoryAllocationException


def test_memory_overflow():
code = """
@external
def zzz(x: DynArray[uint256, 2**59]): # 2**64 / 32 bytes per word == 2**59
y: uint256[7] = [0,0,0,0,0,0,0]
y[6] = y[5]
"""
with pytest.raises(MemoryAllocationException):
compile_code(code)

0 comments on commit 06c4380

Please sign in to comment.