acuarica / evm

A Symbolic Ethereum Virtual Machine (EVM) bytecode interpreter, parser and decompiler, along with several other utils for programmatically extracting information from EVM bytecode.
https://acuarica.github.io/evm/
MIT License
46 stars 5 forks source link

OOM for huge bytecodes #89

Closed egorvas closed 5 months ago

egorvas commented 5 months ago

Hi, I found that when I using your tool for large bytecodes (fox example like for this address 0x6bd332faf55d7b60096332b3fba3f84b8f601202) it cause error "FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory" I tried to increase memory to 16 gb, but its didn help me. With old implementation of the evm module it works fine. Thanks for any help.

acuarica commented 5 months ago

Hi, thanks for sending this. Could you please provide the sevm version where it worked? With this it's easier to find where the problem was introduced.

egorvas commented 5 months ago

Sorry, apparently I expressed myself incorrectly. I mean that parsing (for bytecode of this address) works correctly with the original evm module (https://www.npmjs.com/package/evm)

acuarica commented 5 months ago

Hi @egorvas, this issue is fixed #94. It is included in the latest release https://github.com/acuarica/evm/releases/tag/v0.6.14. Give it a try!

acuarica commented 5 months ago

I mean that parsing (for bytecode of this address) works correctly with the original evm module (https://www.npmjs.com/package/evm)

Just for reference, indeed, the original evm is able to parse the bytecode correctly. However, when trying to decompile it, evm raises the following error

Error: Stack too deep
egorvas commented 5 months ago

@acuarica thx, now its fine.