Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

BinDiff GUI does not show merged ranges in the correct order

Open
#53 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

Research direction

Reproduce the ordering problem with the attached report.zip and the BinDiff GUI flow-graph view, using the described IDA Pro setup. Trace how the GUI orders instructions after the backend provides them; done means the two mov instructions appear before the ldp instruction in the displayed function.

Written by the indexing model from the issue text.

Description

question

Describe the bug
BinExport will merge basic blocks on unconditional branches, however if these blocks are not in increasing order of address, the UI will simply show the instructions in completely the wrong order. This can cause problems in lots of programs, but specifically causes major issues when combined with plugins like FunctionInliner that add unconditional branches to new segments.

To Reproduce
I have attached (report.zip) two programs to diff against to demonstrate the issue. The programs are compiled with: cc -o a -O0 a.S. If you diff them with BinDiff in IDA and compare the flow graphs in the BinDiff GUI, you will see that the following instructions appear at the end of the function, instead of their correct place before the ret:

mov x3, #0x43
mov x4, #0x44

Expected behavior
These two mov instructions should appear before the ldp x29, x30, [sp], 16 instruction. When the BinDiff backend iterates over the instructions in this function from BinExport, it does indeed iterate over it in the correct order, it is just the GUI that incorrectly sorts the instructions rather than leaving them in the same order from the backend.

Screenshots
Function flow graph from IDA
Function flow graph from BinDiff GUI

Environment (please complete the following information):

  • OS and version: Windows 11
  • Locale: British English
  • Disassembler and version: IDA Pro 8.4

Additional context
N/A

Dominant language
Java
Stars
3.2k
Forks
240
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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.

More from google/bindiff

All issues in google/bindiff

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.