google/bindiff

Ignore JMP and treat JX==JNX when diffing basic blocks

Opened this issue · 1 comments

Steps to reproduce the problem:

  1. Diff a program
  2. Open a function with some differences
  3. See some basic blocks which are marked as different only because of the jump at the end

What is the expected behavior?
See the following screenshot:
0j2Y7jD
In such cases, it would be helpful for the blocks to be marked as equal.

What went wrong?
They are marked as different.

What version of the product are you using? On what operating system?
BinDiff 6, Win10.

Ported from b/175509898

These are actually two differeny things:

  1. Ignore unconditional jumps at the end of a basic block when computing the small primes product (SPP)
  2. Detect branch inversion

1 is easy to implement, for 2 we can either just treat all jumps the same or implement some heuristic that detects this.