跳转至

文章背景与核心概要

传统的反编译工具(如 Ghidra 和 Hex-Rays)往往会生成带有明显占位符且无法直接编译的伪代码,用于标记无法解析的底层元素。相比之下,基于大语言模型(LLM)的反编译工具能够输出干净、符合习惯的 C 语言代码,目前的评估标准通常只看其输出能否成功构建并通过一组固定的单元测试。

本文深入探讨了这一现象,指出当前的评估指标存在严重误导性:代码完全可以成功重新编译并通过所有既定测试,但在面对其他有效输入时其行为可能会发生分歧,同时关键的安全漏洞也可能在输出中无声无息地消失。为了揭示这些隐藏的缺陷,作者提出了 Decompile-Diverge——一个行为比较预言机(behavioral comparison oracle),它无需依赖手工编写的测试,便能自动合成驱动程序并扩充模糊测试(fuzzing)语料库,从而检测出隐藏的语义偏移。


When LLM Decompilers Recompile More and Preserve Less

arXiv ID: 2609.05370
Subjects: Cryptography and Security (cs.CR), Artificial Intelligence (cs.AI)
Authors: Chang Liu, Edward Raff, Kristopher Micinski
Submitted: September 4, 2026

arXiv ID: 2609.05370
Subjects: Cryptography and Security (cs.CR), Artificial Intelligence (cs.AI)
Authors: Chang Liu, Edward Raff, Kristopher Micinski
Submitted: September 4, 2026


📌 Summary

Traditional decompilers (like Ghidra and Hex-Rays) often generate uncompilable pseudocode with visible placeholders for unresolved elements. In contrast, Large Language Model (LLM)-based decompilers output clean, idiomatic C code and are typically evaluated on whether their output builds and passes a fixed set of unit tests.

This paper demonstrates that these existing metrics can be deeply misleading: code can successfully recompile and pass every shipped test while still diverging in behavior on other valid inputs, and critical security vulnerabilities can vanish from the output without a trace. To uncover these hidden flaws, the authors introduce Decompile-Diverge, a behavioral comparison oracle that synthesizes drivers and grows fuzzing corpora to detect hidden semantic shifts without relying on hand-crafted tests.

📌 Summary

Traditional decompilers (like Ghidra and Hex-Rays) often generate uncompilable pseudocode with visible placeholders for unresolved elements. In contrast, Large Language Model (LLM)-based decompilers output clean, idiomatic C code and are typically evaluated on whether their output builds and passes a fixed set of unit tests.

This paper demonstrates that these existing metrics can be deeply misleading: code can successfully recompile and pass every shipped test while still diverging in behavior on other valid inputs, and critical security vulnerabilities can vanish from the output without a trace. To uncover these hidden flaws, the authors introduce Decompile-Diverge, a behavioral comparison oracle that synthesizes drivers and grows fuzzing corpora to detect hidden semantic shifts without relying on hand-crafted tests.


📑 Metadata & Reference

📑 Metadata & Reference


🔍 Abstract

Decompilation recovers high-level source from compiled machine code and serves as a foundation for security tasks such as vulnerability detection and malware analysis. Traditional decompilers like Ghidra and Hex-Rays expose whatever they cannot resolve as visible placeholders and often emit pseudocode that will not compile or execute; LLM-based decompilers produce clean, idiomatic C and are now judged almost entirely by recompilability and re-executability: whether the output builds and passes its shipped input/output tests.

We show that these metrics can reward the wrong path: a function may recompile and pass every shipped test yet diverge on other legitimate inputs, and a disclosed vulnerability may disappear from the recompiled code with no visible trace of the crash. Neither failure is caught by existing suites.

To address this gap, we propose Decompile-Diverge, a behavioral comparison oracle not relying on fixed or hand-crafted tests: for each function it synthesizes a driver, grows a fuzzing corpus from the reference, and reruns the decompiled code on the same inputs to detect changes in the function's behavior.

Key Findings:

  • Behavioral Divergence: Across eight systems in nine configurations on established LLM decompilation corpora, candidates that pass every shipped test still diverge from the original on our input corpus (4.9% overall, and up to 13% for a single system).
  • Build Rate vs. Matching Rate: On 300 real GitHub library functions and 287 CVE-grounded functions, recompilability and behavioral agreement can come apart: the strongest refinement LLM lifts Ghidra's build rate from 75% to 90%, while its Matched rate falls from 74% to 62%.
  • Crash Absence: On disclosed vulnerabilities, up to one tenth exhibit Crash Absence in the LLM output.
  • Root Cause: Source-level analysis traces this divergence to introduced fields, types, callees, and guards that replace the visible unknowns traditional tools leave behind.

🔍 Abstract

Decompilation recovers high-level source from compiled machine code and serves as a foundation for security tasks such as vulnerability detection and malware analysis. Traditional decompilers like Ghidra and Hex-Rays expose whatever they cannot resolve as visible placeholders and often emit pseudocode that will not compile or execute; LLM-based decompilers produce clean, idiomatic C and are now judged almost entirely by recompilability and re-executability: whether the output builds and passes its shipped input/output tests.

We show that these metrics can reward the wrong path: a function may recompile and pass every shipped test yet diverge on other legitimate inputs, and a disclosed vulnerability may disappear from the recompiled code with no visible trace of the crash. Neither failure is caught by existing suites.

To address this gap, we propose Decompile-Diverge, a behavioral comparison oracle not relying on fixed or hand-crafted tests: for each function it synthesizes a driver, grows a fuzzing corpus from the reference, and reruns the decompiled code on the same inputs to detect changes in the function's behavior.

Key Findings:

  • Behavioral Divergence: Across eight systems in nine configurations on established LLM decompilation corpora, candidates that pass every shipped test still diverge from the original on our input corpus (4.9% overall, and up to 13% for a single system).
  • Build Rate vs. Matching Rate: On 300 real GitHub library functions and 287 CVE-grounded functions, recompilability and behavioral agreement can come apart: the strongest refinement LLM lifts Ghidra's build rate from 75% to 90%, while its Matched rate falls from 74% to 62%.
  • Crash Absence: On disclosed vulnerabilities, up to one tenth exhibit Crash Absence in the LLM output.
  • Root Cause: Source-level analysis traces this divergence to introduced fields, types, callees, and guards that replace the visible unknowns traditional tools leave behind.