Closed noobdoesre closed 6 years ago
Hey @noobdoesre ! Thank you for reporting this. I'll take a look asap.
The same with this bytecode as well "60606040523615601d5760e060020a6000350463e522538181146059575b6081346060908152600160a060020a033316907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90602090a25b565b6081600054600160a060020a0390811633919091161415605757600054600160a060020a0316ff5b00"
Ok. I just run it and I manage to reproduce them successfully. It looks like those bytecodes are runtime bytecode (as opposed to init bytecode) and you are trying to use it in a CREATE transaction with them. Runtime bytecode will normally use CALLDATA from tx and that's empty in a CREATE tx.
So if you want to just paste the runtime bytecode into some account without running the init bytecode you could...
contract_account = m.create_account(code=bytecode, balance=10000000)
The error messages are bad. And CALLDATA should be empty there but not None in your examples. I'll fix those soon. Thanks.
Yes. I was trying to run the runtime bytecode. Thank you!
I did the above and used "contract_account = m.create_account(code=bytecode, balance=10000000)" for the runtime bytecode. I then get the following error:
Traceback (most recent call last):
File "examples/evm/bytecode_manticore.py", line 155, in
Oh yes! There is an indentation bug there: https://github.com/trailofbits/manticore/blob/master/manticore/ethereum.py#L1971 We'll fix asap.
Send More! thanks.
@feliam is there an issue tracking that bug, or is it already fixed in one of your branches? if it's not addressed yet, can you make a quick issue for it? 🙏
closing since this was merged into master in #926
OS / Environment
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial
Manticore version
Version: 0.1.9
Python version
Python 2.7.12
Dependencies
capstone==3.0.5rc2 cryptography==1.7.1 enum34==1.1.6 idna==2.2 ipaddress==1.0.17 keyring==10.1 keyrings.alt==1.3 manticore==0.1.9 ply==3.11 pyasn1==0.1.9 pycrypto==2.6.1 pyelftools==0.24 pygobject==3.22.0 pysha3==1.0.2 Pyste==0.9.10 python-apt==1.4.0b3 pyxdg==0.25 SecretStorage==2.3.1 six==1.10.0 unicorn==1.0.1 z3-solver==4.5.1.0.post2
Summary of the problem
Trying to run code of https://ropsten.etherscan.io/address/0x5fa35d68db2282fc3fd54c260876e6761d56839f#code results in numerous errors which look like use-after-free.
Step to reproduce the behavior
Expected behavior
Code is emulated successfully or the tool reports that emulation failed.
Actual behavior
Numerous python errors are reported and manticore hangs.
Any relevant logs