slither icon indicating copy to clipboard operation
slither copied to clipboard

Unresolved reference to identifier _b.offset

Open 0x234 opened this issue 3 years ago • 4 comments

'npx hardhat compile --force' running
Downloading compiler 0.7.6
Compiling 30 files with 0.7.6
Compilation finished successfully
<snip>
✅ Generated documentation for 30 contracts

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/slither/__main__.py", line 741, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "/usr/local/lib/python3.7/dist-packages/slither/__main__.py", line 83, in process_all
    ) = process_single(compilation, args, detector_classes, printer_classes)
  File "/usr/local/lib/python3.7/dist-packages/slither/__main__.py", line 66, in process_single
    slither = Slither(target, ast_format=ast, **vars(args))
  File "/usr/local/lib/python3.7/dist-packages/slither/slither.py", line 102, in __init__
    parser.parse_contracts()
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 386, in parse_contracts
    self._analyze_third_part(contracts_to_be_analyzed, libraries)
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 492, in _analyze_third_part
    self._analyze_variables_modifiers_functions(contract)
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 558, in _analyze_variables_modifiers_functions
    contract.analyze_content_functions()
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/declarations/contract.py", line 354, in analyze_content_functions
    function_parser.analyze_content()
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/declarations/function.py", line 319, in analyze_content
    node_parser.analyze_expressions()
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 319, in analyze_expressions
    node.analyze_expressions()
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 59, in analyze_expressions
    expression = parse_yul(self._scope, self, self._unparsed_expression)
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 781, in parse_yul
    op = parsers.get(ast["nodeType"], parse_yul_unsupported)(root, node, ast)
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 673, in parse_yul_function_call
    args = [parse_yul(root, node, arg) for arg in ast["arguments"]]
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 673, in <listcomp>
    args = [parse_yul(root, node, arg) for arg in ast["arguments"]]
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 781, in parse_yul
    op = parsers.get(ast["nodeType"], parse_yul_unsupported)(root, node, ast)
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 673, in parse_yul_function_call
    args = [parse_yul(root, node, arg) for arg in ast["arguments"]]
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 673, in <listcomp>
    args = [parse_yul(root, node, arg) for arg in ast["arguments"]]
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 781, in parse_yul
    op = parsers.get(ast["nodeType"], parse_yul_unsupported)(root, node, ast)
  File "/usr/local/lib/python3.7/dist-packages/slither/solc_parsing/yul/parse_yul.py", line 752, in parse_yul_identifier
    raise SlitherException(f"unresolved reference to identifier {name}")
slither.exceptions.SlitherException: unresolved reference to identifier _b.offset
Error:
unresolved reference to identifier _b.offset
Please report an issue to https://github.com/crytic/slither/issues

0x234 avatar Feb 02 '22 11:02 0x234

Can you share the code that caused this error?

0xalpharush avatar Feb 04 '22 01:02 0xalpharush

@0xalpharush unfortunately not now as it's still in the audit stage. Should the contracts be made open source I'll come back and comment.

0x234 avatar Feb 04 '22 10:02 0x234

https://github.com/crytic/slither/pull/1057

chichke avatar Feb 28 '22 10:02 chichke

Can you try this branch https://github.com/crytic/slither/pull/1188?

0xalpharush avatar May 26 '22 01:05 0xalpharush