Merge pull request #1059 from ConsenSys/bugfix/1055

Fix the source problem by using proper function name
pull/1094/head
Nathan 6 years ago committed by GitHub
commit fb8fd23b2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      mythril/laser/ethereum/svm.py
  2. 2
      mythril/laser/ethereum/transaction/concolic.py

@ -448,7 +448,11 @@ class LaserEVM:
environment = state.environment
disassembly = environment.code
if address in disassembly.address_to_function_name:
if isinstance(
state.world_state.transaction_sequence[-1], ContractCreationTransaction
):
environment.active_function_name = "constructor"
elif address in disassembly.address_to_function_name:
# Enter a new function
environment.active_function_name = disassembly.address_to_function_name[
address

@ -88,7 +88,7 @@ def _setup_global_state_for_execution(laser_evm, transaction) -> None:
condition=None,
)
)
global_state.world_state.transaction_sequence.append(transaction)
global_state.node = new_node
new_node.states.append(global_state)
laser_evm.work_list.append(global_state)

Loading…
Cancel
Save