mythril icon indicating copy to clipboard operation
mythril copied to clipboard

Error in file analysis

Open mstad opened this issue 4 years ago • 1 comments

Description

Error in file analysis

How to Reproduce

$ myth analyze  /home/mirkostad/Programmi/smart-contracts/Mutations/Original/0x3.sol  >> ./Results/Original/0x3.sol.txt
==== Exception state ====
mythril.mythril.mythril_analyzer [CRITICAL]: Exception occurred, aborting analysis. Please report this issue to the Mythril GitHub page.
Traceback (most recent call last):
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/mythril/mythril_analyzer.py", line 159, in fire_lasers
    custom_modules_directory=self.custom_modules_directory,
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/analysis/symbolic.py", line 160, in __init__
    world_state=world_state,
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 168, in sym_exec
    self._execute_transactions(created_account.address)
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 212, in _execute_transactions
    execute_message_call(self, address)
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/transaction/symbolic.py", line 108, in execute_message_call
    laser_evm.exec()
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 244, in exec
    new_states, op_code = self.execute_state(global_state)
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 335, in execute_state
    ).evaluate(global_state)
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/instructions.py", line 244, in evaluate
    result = instruction_mutator(global_state)
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/instructions.py", line 191, in wrapper
    new_global_states = self.call_on_state_copy(func, func_obj, global_state)
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/instructions.py", line 126, in call_on_state_copy
    return func(func_obj, global_state_copy)
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/instructions.py", line 909, in balance_
    address, self.dynamic_loader
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/laser/ethereum/state/world_state.py", line 125, in accounts_exist_or_load
    code=dynamic_loader.dynld(addr),
  File "/home/mirkostad/.local/lib/python3.6/site-packages/mythril/support/loader.py", line 67, in dynld
    raise ValueError("Cannot load from the storage when eth is None")
ValueError: Cannot load from the storage when eth is None

Killed
[0x3.txt](https://github.com/ConsenSys/mythril/files/4844652/0x3.txt)


If there is a Solidity source code, a truffle project, or bytecode
that is involved, please provide that or links to it.

-->

## Expected behavior

File analysis

## Screenshots

<!-- This section is optional.

If applicable, add screenshots to help explain your problem.

-->

## Environment

`pip3 show mythril`->
Name: mythril
Version: 0.22.6
Summary: Security analysis tool for Ethereum smart contracts
Home-page: https://github.com/ConsenSys/mythril
Author: ConsenSys Dilligence
Author-email: None
License: MIT
Location: /home/mirkostad/.local/lib/python3.6/site-packages
Requires: eth-keys, eth-rlp, jinja2, pythx, eth-typing, py-solc-x, ethereum-input-decoder, z3-solver, ethereum, eth-hash, rlp, eth-tester, eth-abi, requests, semantic-version, eth-account, configparser, plyvel, py-evm, coloredlogs, py-solc, persistent, py-ecc, transaction, mock, coverage, py-flags, eth-keyfile, matplotlib

- Solidity compiler and version: `solc --version`
solc, the solidity compiler commandline interface
Version: 0.5.15+commit.6a57276f.Linux.g++

- Python version: `python3 -V`
Python 3.6.9
- OS and Version: [e.g. Mac OS High Sierra]
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic
-->

Thanks for helping!

-->

mstad avatar Jun 29 '20 08:06 mstad

Can you try using --rpc infura-mainnet option too. For that you also have to specify infura-id through commandline. Because without the infura-id arg being set any call to blockchain might fail.

norhh avatar Jul 04 '20 16:07 norhh