-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bug-candidateBugs reports that are not yet confirmedBugs reports that are not yet confirmed
Description
Describe the issue:
I added a new feature to a function to burn tokens within a try/catch. The project is pre-release and currently private, but I can add someone from the team if you want to reproduce the error.
Code example to reproduce the issue:
if (force) {
try getBalance(component) returns (uint256 bal) {
if (bal > 0) {
try sendToDeadAddress(component, bal) returns (bool) {} catch {}
}
} catch {}
}Version:
0.11.3
Relevant log output:
➜ project-name git:(test-owner-attack) slither .
'forge clean' running (wd: /Users/username/Documents/Projects/folder/project-name)
'forge config --json' running
'forge build --build-info --skip */test/** */script/** --force' running (wd: /Users/username/Documents/Projects/folder/project-name)
ERROR:SlitherSolcParsing:
Failed to convert IR to SSA for Node contract. Please open an issue https://github.com/crytic/slither/issues.
Traceback (most recent call last):
File "/opt/homebrew/bin/slither", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/slither/__main__.py", line 776, in main
main_impl(all_detector_classes=detectors, all_printer_classes=printers)
File "/opt/homebrew/lib/python3.11/site-packages/slither/__main__.py", line 882, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/slither/__main__.py", line 107, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/slither/__main__.py", line 80, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/slither/slither.py", line 202, in __init__
self._init_parsing_and_analyses(kwargs.get("skip_analyze", False))
File "/opt/homebrew/lib/python3.11/site-packages/slither/slither.py", line 221, in _init_parsing_and_analyses
raise e
File "/opt/homebrew/lib/python3.11/site-packages/slither/slither.py", line 217, in _init_parsing_and_analyses
parser.analyze_contracts()
File "/opt/homebrew/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 593, in analyze_contracts
self._convert_to_slithir()
File "/opt/homebrew/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 835, in _convert_to_slithir
raise e
File "/opt/homebrew/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 830, in _convert_to_slithir
contract.convert_expression_to_slithir_ssa()
File "/opt/homebrew/lib/python3.11/site-packages/slither/core/declarations/contract.py", line 1571, in convert_expression_to_slithir_ssa
func.generate_slithir_ssa(all_ssa_state_variables_instances)
File "/opt/homebrew/lib/python3.11/site-packages/slither/core/declarations/function_contract.py", line 140, in generate_slithir_ssa
add_ssa_ir(self, all_ssa_state_variables_instances)
File "/opt/homebrew/lib/python3.11/site-packages/slither/slithir/utils/ssa.py", line 206, in add_ssa_ir
fix_phi_rvalues_and_storage_ref(
File "/opt/homebrew/lib/python3.11/site-packages/slither/slithir/utils/ssa.py", line 526, in fix_phi_rvalues_and_storage_ref
fix_phi_rvalues_and_storage_ref(
File "/opt/homebrew/lib/python3.11/site-packages/slither/slithir/utils/ssa.py", line 526, in fix_phi_rvalues_and_storage_ref
fix_phi_rvalues_and_storage_ref(
File "/opt/homebrew/lib/python3.11/site-packages/slither/slithir/utils/ssa.py", line 526, in fix_phi_rvalues_and_storage_ref
fix_phi_rvalues_and_storage_ref(
[Previous line repeated 9 more times]
File "/opt/homebrew/lib/python3.11/site-packages/slither/slithir/utils/ssa.py", line 496, in fix_phi_rvalues_and_storage_ref
variables = [
^
File "/opt/homebrew/lib/python3.11/site-packages/slither/slithir/utils/ssa.py", line 497, in <listcomp>
last_name(dst, ir.lvalue, init_local_variables_instances) for dst in ir.nodes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/slither/slithir/utils/ssa.py", line 363, in last_name
assert candidates
AssertionErrorMetadata
Metadata
Assignees
Labels
bug-candidateBugs reports that are not yet confirmedBugs reports that are not yet confirmed