Skip to content
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

AttributeError: 'ArrayType' object has no attribute 'type_to' #99

Closed
ggrieco-tob opened this issue Dec 11, 2018 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@ggrieco-tob
Copy link
Member

Slither crashes when analyzing this contract:

ERROR:root:Error in contracts/0xb07ec2c28834b889b1ce527ca0f19364cd38935c_CardStackToken.sol
ERROR:root:Traceback (most recent call last):
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/__main__.py", line 226, in main_impl
    (results, number_contracts) = process(filename, args, detector_classes, printer_classes)
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/__main__.py", line 35, in process
    slither = Slither(filename, args.solc, args.disable_solc_warnings, args.solc_args, ast)
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/slither.py", line 41, in __init__
    self._analyze_contracts()
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/solc_parsing/slitherSolc.py", line 191, in _analyze_contracts
    self._convert_to_slithir()
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/solc_parsing/slitherSolc.py", line 317, in _convert_to_slithir
    func.convert_expression_to_slithir()
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/solc_parsing/declarations/function.py", line 838, in convert_expression_to_slithir
    node.slithir_generation()
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/core/cfg/node.py", line 362, in slithir_generation
    self._irs = convert_expression(expression, self)
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/slithir/convert.py", line 682, in convert_expression
    result = apply_ir_heuristics(result, node)
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/slithir/convert.py", line 540, in apply_ir_heuristics
    irs = propage_type_and_convert_call(irs, node)
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/slithir/convert.py", line 156, in propage_type_and_convert_call
    new_ins = propagate_types(ins, node)
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/slithir/convert.py", line 421, in propagate_types
    return convert_type_of_high_level_call(ir, contract)
  File "/home/gustavo/.local/lib/python3.6/site-packages/slither_analyzer-0.3.1-py3.6.egg/slither/slithir/convert.py", line 372, in convert_type_of_high_level_call
    tmp = tmp.type_to
AttributeError: 'ArrayType' object has no attribute 'type_to'
@ggrieco-tob ggrieco-tob added the bug Something isn't working label Dec 11, 2018
@montyly
Copy link
Member

montyly commented Dec 12, 2018

Fixed in master master

@montyly montyly closed this as completed Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants