Closed
Description
Version and Platform (required):
- Binary Ninja Version: 4.3.6844
- OS: Windows
- OS Version: 10
- CPU Architecture: x64
Bug Description:
When clicking on a function that has a pointer to it with the bottom bit set (indicating it is a THUMB function), the xref does not show up.
Steps To Reproduce:
I made this simple program for illustrating the issue:
#include <stdio.h>
void foo() {
printf("foo\n");
}
void bar() {
printf("bar\n");
}
void (*func_ptr)() = foo;
int main(int argc, const char* argv[]) {
if (argc > 1)
func_ptr = bar;
func_ptr();
return 0;
}
- Open
test
from attached zip file - Go to
func_ptr
symbol and set the type to a pointer (I also think binja should be recognizing that this is a pointer automatically) - You should now see
void* func_ptr = foo
- Go to the
foo
function and click on the function name to see the xrefs, and see that there are 0 xrefs to the function
Expected Behavior:
I expect to see an xref to func_ptr
from foo
Screenshots/Video Recording:
N/A
Binary:
test.zip
Additional Information:
I believe the issue is that the xref system is not accounting for the bottom bit being set in the function pointer, which causes the xref to be missing.