binaryninja-api
binaryninja-api copied to clipboard
Variable.set_name_async() fails if self.type is None
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.
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?
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
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.