Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

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

Description

@moodysalem

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions