ehennenfent / binja_explain_instruction

Adds a window to Binary Ninja that explains in simple-ish English what an instruction does
Apache License 2.0
51 stars 4 forks source link

Tailcall causes AttributeError #10

Open nihaals opened 6 months ago

nihaals commented 6 months ago

Describe the bug Navigating to a tailcall()/__tailcall causes an AttributeError.

Offending instruction information

Address:
  0x100003d98
Architecture:
  aarch64
bv.read:
  00021fd6
bv.get_disassembly:
  br      x16
function.get_lifted_il_at:
  jump(x16)
function.get_lifted_ils_at:
  [<LowLevelILJump: jump(x16)>, <LowLevelILUndef: undefined>, <LowLevelILJump: jump(0x100003d9c)>]
function.get_llil_at:
  <return> tailcall(x16)
function.get_llils_at:
  [<LowLevelILTailcall: <return> tailcall(x16)>]
architecture.get_low_level_il_from_bytes:
  jump(x16)

Expected behavior The error is not shown.

Actual behavior

[Default] Traceback (most recent call last):
[Default]   File "/.../explain.py", line 196, in explain_llil
[Default]     return explanations[name].format(**preprocess(bv, llil_instruction))
[Default]   File "/.../explain.py", line 35, in __getattr__
[Default]     raise AttributeError(f"{self.instruction} has no attribute '{item}'")
[Default] AttributeError: <return> tailcall(x16) has no attribute 'params'
...

Platform Information (please complete the following information):