tealer icon indicating copy to clipboard operation
tealer copied to clipboard

Tealer error in check_rekey_to

Open gidonkatten opened this issue 3 years ago • 2 comments

When running the command tealer contract.teal, I get the following error:

Traceback (most recent call last):
  File "/Users/gidon/tealer/venv/bin/tealer", line 33, in <module>
    sys.exit(load_entry_point('tealer==0.0.2', 'console_scripts', 'tealer')())
  File "/Users/gidon/tealer/venv/lib/python3.8/site-packages/tealer-0.0.2-py3.8.egg/tealer/__main__.py", line 75, in main
  File "/Users/gidon/tealer/venv/lib/python3.8/site-packages/tealer-0.0.2-py3.8.egg/tealer/detectors/rekeyto.py", line 79, in detect
  File "/Users/gidon/tealer/venv/lib/python3.8/site-packages/tealer-0.0.2-py3.8.egg/tealer/detectors/rekeyto.py", line 74, in check_rekey_to
  File "/Users/gidon/tealer/venv/lib/python3.8/site-packages/tealer-0.0.2-py3.8.egg/tealer/detectors/rekeyto.py", line 74, in check_rekey_to
  File "/Users/gidon/tealer/venv/lib/python3.8/site-packages/tealer-0.0.2-py3.8.egg/tealer/detectors/rekeyto.py", line 74, in check_rekey_to
  [Previous line repeated 18 more times]
  File "/Users/gidon/tealer/venv/lib/python3.8/site-packages/tealer-0.0.2-py3.8.egg/tealer/detectors/rekeyto.py", line 54, in check_rekey_to
KeyError: 4

I haven't managed to isolate the breaking code (the teal code is over 2000 lines) so I am not sure what the issue is.

When I run the command with the --print-cfg option then it does successfully create the CFG.

gidonkatten avatar Jan 18 '22 17:01 gidonkatten

Thank you! We will look into this.

Are you able to share the contract producing this input?
Please let us know if you manage to isolate the code that reproduces this.

feliam avatar Jan 18 '22 17:01 feliam

Sorry I can't share the code but I will try to isolate the code that is causing the error

gidonkatten avatar Jan 18 '22 17:01 gidonkatten