binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Variable.set_name_async() fails if self.type is None

Open kristopax opened this issue 1 year ago • 2 comments

Version and Platform (required):

  • Binary Ninja Version: latest
  • OS: all
  • OS Version: all
  • CPU Architecture: all

Bug Description: In variable.py, the method Variable.set_name_async() fails when self.type is None.

Additional Information: Sidekick uses this API when applying variable name suggestions.

kristopax avatar Jul 30 '24 16:07 kristopax

https://github.com/Vector35/binaryninja-api/blob/52c4e5695f9c86cb319f07682c27be9e4e576559/python/variable.py#L894-L902 Should set_name_async just return None and log an error message or should it raise an exception?

SmoothHacker avatar Oct 04 '24 00:10 SmoothHacker

Most operations on a variable without a type will fail - the real bug is that you were able to get a variable with no type associated

negasora avatar Oct 15 '24 20:10 negasora

I've tried to reproduce this by scanning dozens of binaries for variables without types. I can't make progress on this until I have a repro of a typeless variable.

plafosse avatar Nov 08 '24 13:11 plafosse