Some older contracts (such as ones that forward calls) will not have
a normal dispatcher form. In some of these cases, jumps were being
picked up as the fallback function, when usually they are just invalid
jumps (which have been replaced with jumps to the special invalid basic
block). This would cause ethersplay to try create and explore a function
outside of the range of the binary view, freezing binaryninja and
causing endless callbacks.
This commit adds a check to makes sure ethersplay does not try to make a
fallback function outside of the binary view. However It does not stop it
from making an erroneous one if there is a non-invalid jumpi in the
first basic block, better heuristics could be employed to stop that.
Example contract this fixes ethersplay for:
freeze.zip
Some older contracts (such as ones that forward calls) will not have a normal dispatcher form. In some of these cases, jumps were being picked up as the fallback function, when usually they are just invalid jumps (which have been replaced with jumps to the special invalid basic block). This would cause ethersplay to try create and explore a function outside of the range of the binary view, freezing binaryninja and causing endless callbacks.
This commit adds a check to makes sure ethersplay does not try to make a fallback function outside of the binary view. However It does not stop it from making an erroneous one if there is a non-invalid jumpi in the first basic block, better heuristics could be employed to stop that.
Example contract this fixes ethersplay for: freeze.zip