Giter Club home page Giter Club logo

ethdasm's People

Contributors

meyer9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ethdasm's Issues

Bug with functions that pass through stack values

Bytecode to reproduce:

600160025b5b01

Disassembled bytecode:

; Procedure 0x0
[     0x0] | PUSH1                | [1]
[     0x2] | PUSH1                | [2]

; Procedure 0x4
[     0x4] | JUMPDEST             | None

; Procedure 0x5
[     0x5] | JUMPDEST             | None
[     0x6] | ADD                  | None

Error:

Traceback (most recent call last):
  File "ethdasm.py", line 18, in <module>
    blocks = contract.parse()
  File "/Users/jmeyer2k/development/ethdasm/ethdasm/contract.py", line 328, in parse
    self.__add_final_functions()
  File "/Users/jmeyer2k/development/ethdasm/ethdasm/contract.py", line 272, in __add_final_functions
    arguments.append(block.return_vals[i])
IndexError: list index out of range

The problem here is that the ending function for the second block actually requires arguments to be passed through. It might need to add arguments to the previous function if the next function requires more values than the block puts on the stack.

Also, a problem arises when now we need to update the previous block to take in a certain number of parameters.

This bug will require some serious thinking.

Default to disassemble for CLI

I tried to run the disassembler, and got the following error.

[16:20] yh@sri: ~/src/ethdasm$ python --version
Python 2.7.13
[16:20] yh@sri: ~/src/ethdasm$ cat test.hex 
0x60606040
[16:20] yh@sri: ~/src/ethdasm$ python ethdasm.py test.hex
Traceback (most recent call last):
  File "ethdasm.py", line 2, in <module>
    from contract import Contract
  File "/home/yh/src/ethdasm/contract.py", line 28
    address: int
           ^
SyntaxError: invalid syntax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.