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
contract C {
function f() public {
function () external payable x;
x.value(msg.value)();
}
}
Stack trace:
ERROR:root:Traceback (most recent call last):
File "c:\users\vyper\documents\github\slither\slither\__main__.py", line 250, in main_impl
(results, number_contracts) = process(filename, args, detector_classes, printer_classes)
File "c:\users\vyper\documents\github\slither\slither\__main__.py", line 35, in process
slither = Slither(filename, args.solc, args.disable_solc_warnings, args.solc_args, ast)
File "c:\users\vyper\documents\github\slither\slither\slither.py", line 41, in __init__
self._analyze_contracts()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\slitherSolc.py", line 210, in _analyze_contracts
self._convert_to_slithir()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\slitherSolc.py", line 336, in _convert_to_slithir
contract.convert_expression_to_slithir()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\declarations\contract.py", line 367, in convert_expression_to_slithir
func.generate_slithir_and_analyze()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\declarations\function.py", line 927, in generate_slithir_and_analyze
node.slithir_generation()
File "c:\users\vyper\documents\github\slither\slither\core\cfg\node.py", line 508, in slithir_generation
self._find_read_write_call()
File "c:\users\vyper\documents\github\slither\slither\core\cfg\node.py", line 551, in _find_read_write_call
self._high_level_calls.append((ir.destination.type.type, ir.function))
AttributeError: 'FunctionType' object has no attribute 'type'
The text was updated successfully, but these errors were encountered:
This may be a separate issue, but the stack trace leads to the same place (albeit under different circumstances), so I will share it here:
Slither errors when parsing a function call that is provided through a library, for a struct member (if that struct has the same name as the contract/shadows it):
library TestLib {
function test(uint a) internal pure returns (uint) {
return a;
}
}
contract ShadowedName {
using TestLib for uint;
struct ShadowedName {
uint y;
}
function f(uint256 id1, uint256 id2) public {
ShadowedName memory structInstance;
structInstance.y = (structInstance.y).test();
}
}
Stack trace:
Traceback (most recent call last):
File "c:\users\vyper\documents\github\slither\slither\__main__.py", line 250, in main_impl
(results, number_contracts) = process(filename, args, detector_classes, printer_classes)
File "c:\users\vyper\documents\github\slither\slither\__main__.py", line 35, in process
slither = Slither(filename, args.solc, args.disable_solc_warnings, args.solc_args, ast)
File "c:\users\vyper\documents\github\slither\slither\slither.py", line 41, in __init__
self._analyze_contracts()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\slitherSolc.py", line 214, in _analyze_contracts
self._convert_to_slithir()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\slitherSolc.py", line 349, in _convert_to_slithir
raise type(e)(f"{e} occurs in file: {contract.source_mapping_str}\n")
AttributeError: 'NoneType' object has no attribute 'type'
The following contract will crash slither:
Stack trace:
The text was updated successfully, but these errors were encountered: