Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"KeyError: 0" error #36

Open
afghanistan21 opened this issue Dec 7, 2021 · 0 comments
Open

"KeyError: 0" error #36

afghanistan21 opened this issue Dec 7, 2021 · 0 comments

Comments

@afghanistan21
Copy link

afghanistan21 commented Dec 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant