Vector35 / Vector35/binaryninja-api

Auto Data References Missing Until Database Save

Open
#7,841 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 5.3.8837-dev Ultimate, d2d9934a
  • OS: macos
  • OS Version: 26.2.0
  • CPU Architecture: arm64

Bug Description:
The analysis results are different if you open a file in GUI vs loading the exact same file using the API. Specifically, data references are missing.

Steps To Reproduce:

  1. Open file in GUI: geometric badge clones simply
  2. Save database.
  3. Open file using API load() via code below.
  4. Compare to exactly same code, but open the GUI created database.
import pathlib
import sys
sys.path.append('/Applications/Binary Ninja.app/Contents/Resources/python')
import binaryninja
bv = binaryninja.load('0ba5fb69df06f6e84191861f8e7988c97c637f7c1c4220016e337418916557bb')
bv.update_analysis_and_wait()
f = bv.get_function_at(0x7ff6c4a472a0)
print(f.name)
refs = bv.get_data_refs(f.start)
print(list(refs))

VS

import pathlib
import sys
sys.path.append('/Applications/Binary Ninja.app/Contents/Resources/python')
import binaryninja
bv = binaryninja.load('foo.bndb')
bv.update_analysis_and_wait()
f = bv.get_function_at(0x7ff6c4a472a0)
print(f.name)
refs = bv.get_data_refs(f.start)
print(list(refs))

Expected Behavior:
Same analysis in equivalent BNDBs.

Screenshots:
GUI:

Image

API:

Image

Binary:
geometric badge clones simply

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the discrepancy with Python load(), update_analysis_and_wait(), get_function_at(), and get_data_refs() using the binary and BNDB described in the issue. Compare API-loaded and GUI-saved databases, then trace the analysis and data-reference behavior until both paths produce the same references.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.