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

fails with casm for 2.1.0 compiler with IndexError: list index out of range #139

Open
moodysalem opened this issue Aug 3, 2023 · 0 comments

Comments

@moodysalem
Copy link

with casm output file from latest scarb 0.6.0-alpha.4, it prints ~300 lines like this
image

and then this stack trace

Traceback (most recent call last):
  File "/home/runner/.local/bin/thoth", line 8, in <module>
    sys.exit(main())
  File "/home/runner/.local/lib/python3.10/site-packages/thoth/thoth.py", line 213, in main
    if a._detect():
  File "/home/runner/.local/lib/python3.10/site-packages/thoth/app/analyzer/testing/tests_cases_generator.py", line 34, in _detect
    decompiler.decompile_code(first_pass_only=True)
  File "/home/runner/.local/lib/python3.10/site-packages/thoth/app/decompiler/decompiler.py", line 193, in decompile_code
    self.print_build_code(
  File "/home/runner/.local/lib/python3.10/site-packages/thoth/app/decompiler/decompiler.py", line 91, in print_build_code
    source_code += self._handle_assert_eq_decomp(instruction)
  File "/home/runner/.local/lib/python3.10/site-packages/thoth/app/decompiler/_instruction_handlers.py", line 211, in _handle_assert_eq_decomp
    if self.ssa.get_variable(op0_register, offset_1)[2] in phi_node_variables:
  File "/home/runner/.local/lib/python3.10/site-packages/thoth/app/decompiler/ssa.py", line 96, in get_variable
    name = self.memory[position].name
IndexError: list index out of range
@moodysalem moodysalem changed the title fails with casm for 2.1.0 comiler fails with casm for 2.1.0 compiler Aug 3, 2023
@moodysalem moodysalem changed the title fails with casm for 2.1.0 compiler fails with casm for 2.1.0 compiler with IndexError: list index out of range Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant