You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a fuzz testing contract that I generated using my differential fuzzing test generator, and it compiles, but I was getting an error when trying to test it with Echidna. So I ran slither --print echidna ./src/test/compound/DiffFuzzCustomInitialization.sol and saw the AssertionError below.
It appears to be asserting that None is either a Contract, Structure or Enum.
Error in /home/webthethird/Ethereum/solidity-diff-fuzz-upgrades/src/test/compound/DiffFuzzCustomInitialization.sol
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/__main__.py", line 834, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/__main__.py", line 98, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/__main__.py", line 76, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/slither.py", line 133, in __init__
self._init_parsing_and_analyses(kwargs.get("skip_analyze", False))
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/slither.py", line 153, in _init_parsing_and_analyses
raise e
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/slither.py", line 149, in _init_parsing_and_analyses
parser.analyze_contracts()
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/solc_parsing/slither_compilation_unit_solc.py", line 529, in analyze_contracts
self._convert_to_slithir()
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/solc_parsing/slither_compilation_unit_solc.py", line 740, in _convert_to_slithir
func.generate_slithir_and_analyze()
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/core/declarations/function.py", line 1750, in generate_slithir_and_analyze
node.slithir_generation()
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/core/cfg/node.py", line 719, in slithir_generation
self._irs = convert_expression(expression, self)
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/slithir/convert.py", line 119, in convert_expression
result = apply_ir_heuristics(result, node)
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/slithir/convert.py", line 1858, in apply_ir_heuristics
irs = propagate_type_and_convert_call(irs, node)
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/slithir/convert.py", line 442, in propagate_type_and_convert_call
new_ins = propagate_types(ins, node)
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/slithir/convert.py", line 774, in propagate_types
ir.lvalue.set_type(UserDefinedType(contract))
File "/usr/local/lib/python3.10/dist-packages/slither_analyzer-0.9.2-py3.10.egg/slither/core/solidity_types/user_defined_type.py", line 19, in __init__
assert isinstance(t, (Contract, Enum, Structure))
AssertionError
The text was updated successfully, but these errors were encountered:
This is a duplicate of #1594 and related to this PR #1539
Ahh, didn't see that. Seems like PR #1539 is only blocked because of an old bug in the CI re pip-audit. If the CI checks were run again it'd probably pass. Anyway, either that or my fix in #1786 should probably be merged, right?
0xalpharush
changed the title
[Bug-Candidate]: AssertionError in UserDefinedType.__init__()
[Bug]: AssertionError in UserDefinedType.__init__()Mar 22, 2023
Describe the issue:
I've got a fuzz testing contract that I generated using my differential fuzzing test generator, and it compiles, but I was getting an error when trying to test it with Echidna. So I ran
slither --print echidna ./src/test/compound/DiffFuzzCustomInitialization.sol
and saw the AssertionError below.It appears to be asserting that
None
is either a Contract, Structure or Enum.Code example to reproduce the issue:
https://github.com/webthethird/solidity-diff-fuzz-upgrades/blob/main/src/test/compound/DiffFuzzCustomInitialization.sol
https://github.com/webthethird/solidity-diff-fuzz-upgrades/blob/main/src/test/compound/DiffFuzzUpgrades.sol
Version:
0.9.2
Relevant log output:
The text was updated successfully, but these errors were encountered: