Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
921 stars 208 forks source link

Ability to disable annotations for the address `0x0` #4788

Open jonpalmisc opened 11 months ago

jonpalmisc commented 11 months ago

For binaries based at address 0x0, Binary Ninja generates lots of annotations whenever the constant zero is used which is rather annoying since they are never helpful. In the screenshot below, obviously the Mach-O header is not actually being referenced, but Binary Ninja insists on generating an annotation referencing it every time the value 0x0 appears.

Binary Ninja 3.6.4689-dev, 7e4a998c

image
alexrp commented 11 months ago

Not sure to what extent it ties into this issue, but I would also add that the fact that BN maintains xrefs to address 0x0 wherever it appears (regardless of where the binary is based) can be quite annoying when working on large binaries, as accidentally clicking on a 0x0 constant causes BN to freeze for upwards of a minute while computing the huge amount of xrefs.

It seems like some kind of setting to configure BN's treatment of 0x0 could go a long way here.

psifertex commented 11 months ago

There shouldn't be xrefs if it's been based and there's no memory mappings at 0x0. That definitely sounds like a bug. That's always been our recommendation for when that is an issue but if it's not working, we should definitely track that in a separate issue.

alexrp commented 11 months ago

Ok, filed a separate bug for that: #4789