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

IndexError: index out of range in Binary Ninja API code #5

Open
droe opened this issue Dec 12, 2024 · 2 comments
Open

IndexError: index out of range in Binary Ninja API code #5

droe opened this issue Dec 12, 2024 · 2 comments
Labels
bug-upstream Something isn't working, issue is upstream in Binary Ninja

Comments

@droe
Copy link
Owner

droe commented Dec 12, 2024

[Default] Traceback (most recent call last):
[Default]   File "/Applications/Binary Ninja.app/Contents/MacOS/plugins/../../Resources/python/binaryninja/plugin.py", line 361, in _high_level_il_instruction_is_valid
[Default]     return is_valid(view_obj, func_obj[instr])
[Default]   File "/Applications/Binary Ninja.app/Contents/MacOS/plugins/../../Resources/python/binaryninja/highlevelil.py", line 2477, in __getitem__
[Default]     raise IndexError("index out of range")
[Default] IndexError: index out of range

Repro:

  • Open target
  • Click on function call in HLIL
  • Press Escape

Mere presence of a plugin with is_valid handler seems to be enough, it is not needed to execute a plugin command.

Workaround:

  • Removing is_valid handler from plugin command registration.

Reported a bug upstream: Vector35/binaryninja-api#6254

@WeiN76LQh
Copy link

Yeah I've been experiencing this, seems to be a recently introduced upstream bug

@droe droe added the bug-upstream Something isn't working, issue is upstream in Binary Ninja label Dec 12, 2024
@droe
Copy link
Owner Author

droe commented Dec 22, 2024

Disabled is_valid in 5b80ee5 to work round this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-upstream Something isn't working, issue is upstream in Binary Ninja
Projects
None yet
Development

No branches or pull requests

2 participants