-
Notifications
You must be signed in to change notification settings - Fork 968
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
[Bug]: Impossible to generate IR: 'NoneType' object has no attribute 'type' #1536
Labels
duplicate
This issue or pull request already exists
Comments
Related: Code example to reproduce the issue:Types.sol: type Fixed256x18 is int256; Contract.sol: import "./Types.sol" as Types;
contract Contract {
Types.Fixed256x18 value = Types.Fixed256x18.wrap(0);
} Relevant log output:Error in .
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/slither/__main__.py", line 826, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/opt/homebrew/lib/python3.10/site-packages/slither/__main__.py", line 97, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/opt/homebrew/lib/python3.10/site-packages/slither/__main__.py", line 75, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
File "/opt/homebrew/lib/python3.10/site-packages/slither/slither.py", line 130, in __init__
parser.analyze_contracts()
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 500, in analyze_contracts
self._convert_to_slithir()
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 685, in _convert_to_slithir
func.generate_slithir_and_analyze()
File "/opt/homebrew/lib/python3.10/site-packages/slither/core/declarations/function.py", line 1705, in generate_slithir_and_analyze
node.slithir_generation()
File "/opt/homebrew/lib/python3.10/site-packages/slither/core/cfg/node.py", line 719, in slithir_generation
self._irs = convert_expression(expression, self)
File "/opt/homebrew/lib/python3.10/site-packages/slither/slithir/convert.py", line 119, in convert_expression
result = apply_ir_heuristics(result, node)
File "/opt/homebrew/lib/python3.10/site-packages/slither/slithir/convert.py", line 1792, in apply_ir_heuristics
find_references_origin(irs)
File "/opt/homebrew/lib/python3.10/site-packages/slither/slithir/convert.py", line 1594, in find_references_origin
ir.lvalue.points_to = ir.variable_left
File "/opt/homebrew/lib/python3.10/site-packages/slither/slithir/variables/reference.py", line 52, in points_to
assert is_valid_lvalue(points_to) or isinstance(
AssertionError |
Related to #1452 |
0xalpharush
added
bug
Something isn't working
High Priority
and removed
bug-candidate
Bugs reports that are not yet confirmed
labels
Dec 29, 2022
0xalpharush
changed the title
[Bug-Candidate]: Impossible to generate IR: 'NoneType' object has no attribute 'type'
[Bug]: Impossible to generate IR: 'NoneType' object has no attribute 'type'
Dec 29, 2022
0xalpharush
added
duplicate
This issue or pull request already exists
and removed
bug
Something isn't working
High Priority
ir
labels
Jan 12, 2023
Tracking in #1452 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue:
It seems that slither is unable to work with the
import ... as ...
syntax.Code example to reproduce the issue:
Types.sol:
Contract.sol:
Version:
0.9.1
Relevant log output:
The text was updated successfully, but these errors were encountered: