Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
EVM dynamic array maybe occupy large memory #18289
Dynamic array save itself length in memory and this length will restrict index of array .
See the assambly ,
So call function a like this
We know Solc will auto insert array index check code in assambly ,so I try still rewrite the dynamic length .
Unfortunately ,it can't pass compile .It mean we rewrite the length of dynamic array .But I try to rewrite the array length on memory that is work .
Lastly ,I try writing a data to offset 0xC800000 in array .EVM will occupy large memory (200 MB)
Steps to reproduce the behaviour
This is EVM test command (ignore gas-limit ):
Not found ,you can see large memory alloc output on console by --debug flag .