Open SecondNewtonLaw opened 2 weeks ago
Which API specifically are you using?
Which API specifically are you using?
The C++ API, my bad for not specifying
Which API specifically are you using?
The C++ API, my bad for not specifying
We actually mean the name of the API function :)
Which API specifically are you using?
The C++ API, my bad for not specifying
We actually mean the name of the API function :)
BinaryNinja::Function::GetConstantsReferencedByInstructionIfAvailable(Architecture *arch, uintptr_t addr)
is the function in question
Version and Platform (required):
Bug Description: While using the Binary Ninja C++ API, I noticed that in certain instructions the referenced constants are none, but in the dissassembly there are indeed constant references. This appears to happen for instructions that go as follows:
cmp ... [rip + ...], ...
or at least it did so on my light testing, however it also seems consistent with the fact that there is a relative pointer on the first operand of the instruction.Steps To Reproduce:
consts.size()
.Expected Behavior: The constants provided by the API should resolve correctly.
Screenshots/Video Recording:
Binary: The issue is not specific to the binary and can be replicated via the usage of static variables like in the following sample.
This code should generate the assembly that appears to show this issue.