Skip to content

[Bug] Protobuf message size limit of 2GB exceeded during final stage of diffing large binaries #82

@X-Cicada

Description

@X-Cicada
**Describe the bug**

When diffing two large and complex binaries (e.g., in the 500MB - 1.5GB range per file), the BinDiff engine successfully processes most of the diff but fails at the very final stage. The process terminates with an error message indicating that the Protocol Buffers message size limit of 2GB has been exceeded.

**To Reproduce**

1.  Generate `.BinExport` files for two large, complex executables. The individual `.BinExport` files themselves are under 2GB.
2.  Load both files into the BinDiff UI for comparison.
3.  The diffing process runs for a significant amount of time, appearing to complete the matching algorithms.
4.  At the end of the process, the error related to the 2GB Protobuf limit is thrown, and the diff fails to complete.

**Expected behavior**

The diff should complete successfully, and the results should be displayed, even for large and complex binaries where the internal match data is extensive.

**Analysis of Root Cause**

This bug suggests that BinDiff is attempting to serialize the **entire set of diff results**—including all function matches, basic block matches, and associated metadata—into a *single internal Protocol Buffers message*. For sufficiently complex binaries, the sheer volume of this match data can cause the resulting message to surpass the hard 2GB limit of the Protobuf library.

This is an architectural limitation in how the final results are aggregated and handled internally.

**Environment:**
* **OS:** `[e.g., Windows 11 / Ubuntu 22.04]`
* **BinDiff Version:** `[e.g., 8.0]`
* **Disassembler:** `[e.g., IDA Pro 8.4]`
* **System RAM:** `[e.g., 64 GB]`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions