[Bug-Candidate]: infinite loop in `data_dependency.py`
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the issue:
Slither seems to never quit. Hitting Ctrl-C will show the below output. Possibly highlighting an infinite loop.
### Code example to reproduce the issue:
`slither 0x66017D22b0f8556afDd19FC67041899Eb65a21bb`
### Version:
`dev` branch on commit `5fd5d4f6ce960693404147e6e5edbec2f82824fa`
### Relevant log output:
```
Traceback (most recent call last):
File "/Users/rmi7/.virtualenvs/venv1/bin/slither", line 33, in
sys.exit(load_entry_point('slither-analyzer', 'console_scripts', 'slither')())
File "/Users/rmi7/Tools/slither/slither/__main__.py", line 632, in main
main_impl(all_detector_classes=detectors, all_printer_classes=printers)
File "/Users/rmi7/Tools/slither/slither/__main__.py", line 744, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/Users/rmi7/Tools/slither/slither/__main__.py", line 87, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/Users/rmi7/Tools/slither/slither/__main__.py", line 70, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
File "/Users/rmi7/Tools/slither/slither/slither.py", line 123, in __init__
parser.analyze_contracts()
File "/Users/rmi7/Tools/slither/slither/solc_parsing/slither_compilation_unit_solc.py", line 445, in analyze_contracts
compute_dependency(self._compilation_unit)
File "/Users/rmi7/Tools/slither/slither/analyses/data_dependency/data_dependency.py", line 295, in compute_dependency
compute_dependency_contract(contract, compilation_unit)
File "/Users/rmi7/Tools/slither/slither/analyses/data_dependency/data_dependency.py", line 318, in compute_dependency_contract
propagate_contract(contract, KEY_SSA, KEY_NON_SSA)
File "/Users/rmi7/Tools/slither/slither/analyses/data_dependency/data_dependency.py", line 361, in propagate_contract
transitive_close_dependencies(contract, context_key, context_key_non_ssa)
File "/Users/rmi7/Tools/slither/slither/analyses/data_dependency/data_dependency.py", line 344, in transitive_close_dependencies
[ # pylint: disable=expression-not-assigned
File "/Users/rmi7/Tools/slither/slither/analyses/data_dependency/data_dependency.py", line 345, in
[
File "/Users/rmi7/Tools/slither/slither/analyses/data_dependency/data_dependency.py", line 346, in
to_add[key].update(context.context[context_key][item] - {key} - items)
```
Contributor guide
Assessment
This issue has not been assessed yet.