Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

"KeyError: 0" error #36

Description

@afghanistan21

When used with slyther and and a solidity version <0.5.x it gives the following error:

File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 741, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 83, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 68, in process_single
return _process(slither, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 115, in _process
printer_results = slither.run_printers()
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/slither.py", line 195, in run_printers
return [p.output(self._crytic_compile.target).data for p in self._printers]
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/slither.py", line 195, in
return [p.output(self._crytic_compile.target).data for p in self._printers]
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/printers/summary/evm.py", line 79, in output
evm_info = _extract_evm_info(self.slither)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/printers/summary/evm.py", line 32, in _extract_evm_info
cfg = CFG(contract_bytecode_runtime)
File "/usr/local/lib/python3.6/dist-packages/evm_cfg_builder/cfg/init.py", line 96, in init
self.create_functions()
File "/usr/local/lib/python3.6/dist-packages/evm_cfg_builder/cfg/init.py", line 183, in create_functions
self.compute_functions(self._basic_blocks[0], True)
KeyError: 0
None

Traceback (most recent call last):
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 741, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 83, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 68, in process_single
return _process(slither, detector_classes, printer_classes)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/main.py", line 115, in _process
printer_results = slither.run_printers()
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/slither.py", line 195, in run_printers
return [p.output(self._crytic_compile.target).data for p in self._printers]
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/slither.py", line 195, in
return [p.output(self._crytic_compile.target).data for p in self._printers]
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/printers/summary/evm.py", line 79, in output
evm_info = _extract_evm_info(self.slither)
File "/home/ethsec/.local/lib/python3.6/site-packages/slither/printers/summary/evm.py", line 32, in _extract_evm_info
cfg = CFG(contract_bytecode_runtime)
File "/usr/local/lib/python3.6/dist-packages/evm_cfg_builder/cfg/init.py", line 96, in init
self.create_functions()
File "/usr/local/lib/python3.6/dist-packages/evm_cfg_builder/cfg/init.py", line 183, in create_functions
self.compute_functions(self._basic_blocks[0], True)
KeyError: 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions