Recompilation Is Not Enough: Test-Guided Decompiled-C Repair
- URL: http://arxiv.org/abs/2609.07201v1
- Date: Mon, 07 Sep 2026 08:24:53 GMT
- Title: Recompilation Is Not Enough: Test-Guided Decompiled-C Repair
- Abstract summary: Decompiled C often becomes recompilable only after repair, but recompilation alone does not establish test-observed behavior.<n>We present a few-step workflow for repairing decompiled C using compiler feedback and related official tests.
- Score: 4.193403311740078
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Decompiled C often becomes recompilable only after repair, but recompilation alone does not establish test-observed behavior. A recompiled command-line binary can still parse options incorrectly, print different bytes, or return a different exit status. We present a few-step workflow for repairing decompiled C using compiler feedback and related official tests. Compiler and linker diagnostics first guide build repair. Once the repaired C recompiles into a binary, smoke checks and related official tests expose behavioral discrepancies for semantic repair. In a preliminary static-enriched evaluation on 104 Coreutils 9.5 binaries with available decompiler exports and deterministic exact-output smoke comparisons, 91 binaries (87.5%) recompile and pass the test gate; 9 do not recompile within the repair budget, and 4 recompile but still fail the test gate. The result suggests that test-gate feedback can make LLM-assisted repair of decompiled C more auditable than compile-only recovery.
Related papers
- ExecCritic: Learn to Test, Test to Improve for Coding Agents [68.42713285082912]
Execution feedback can guide coding agents toward correct repository repairs, but only when the tests capture the behavior requested by the issue.<n>We introduce ExecCritic, combining a test--verify--revise scaffold with a role-specific reinforcement learning recipe for training agents within it.<n>The scaffold separates test construction from source-code repair: a Test agent independently generates repository-native tests, a fail-closed harness qualifies and freezes them, and a Repair agent revises source code from their execution feedback without changing the tests.
arXiv Detail & Related papers (2026-09-08T17:53:37Z) - When LLM Decompilers Recompile More and Preserve Less [35.2873296518414]
We show that a function may and pass every shipped test yet diverge on other legitimate inputs.<n>We propose De-Diverge, a behavioral comparison oracle not relying on fixed or hand-crafted tests.
arXiv Detail & Related papers (2026-09-04T17:16:18Z) - Automated Testing and Repair for Verified Compilers Generated by a Coding Agent [0.0]
We present an agent based automated testing and repair system for verified compilers.<n>We present specialized defect detection techniques that exploit the structure present in such compilers.
arXiv Detail & Related papers (2026-07-31T01:04:24Z) - One Rewrite to Fix Them All? Type-Aware Repair Allocation for Text-to-Image Prompt Optimization [59.164665622252016]
Text-to-image (T2I) generators often fail to follow their prompts faithfully, producing wrong counts, swapped attributes, ambiguous relations, and illegible text.<n> Prompt optimization repairs such failures by rewriting the user prompt, requiring no generator retraining, and has yielded promising results.<n>We formulate semantic prompt optimization as atomic repair allocation: each failed proposition is routed to a type-conditioned repair operator before the resulting local constraints are compiled into one executable prompt.
arXiv Detail & Related papers (2026-07-21T05:31:43Z) - Decaf: Improving Neural Decompilation with Automatic Feedback and Search [64.02615739798277]
High-level syntax, identifiers, and custom data types are generally lost as the compiler translates human-readable code to low-level machine code.<n>Generative AI models are a natural fit for reconstructing high-level syntax, identifiers, and types.<n>We argue that compiler feedback can be used to dramatically improve the semantic correctness of neural decompiler outputs via search.
arXiv Detail & Related papers (2026-05-12T04:21:26Z) - Constraint-Guided Multi-Agent Decompilation for Executable Binary Recovery [47.704311990064554]
Decompilation is essential for security analysis, malware reverse engineering, and legacy software maintenance.<n>We present a multi-agent framework that transforms decompiled code into re-executable source through Multi-level Constraint-Guided Decompilation (MCGD)<n>Our framework achieves 84-97% re-executability, improving baseline decompiler output by 28-89 percentage points.
arXiv Detail & Related papers (2026-04-27T01:28:11Z) - PCodeTrans: Translate Decompiled Pseudocode to Compilable and Executable Equivalent [8.576619291429969]
PCodeTrans bridges the gap between decompilation, recompilation, and rigorous function-level dynamic validation.<n>It achieves 100% function-level compilability on unstripped binaries alongside 99.55% and 99.89% test-validated behavioral consistency.
arXiv Detail & Related papers (2026-03-16T05:54:24Z) - Context-Guided Decompilation: A Step Towards Re-executability [50.71992919223209]
Binary decompilation plays an important role in software security analysis, reverse engineering and malware understanding.<n>Recent advances in large language models (LLMs) have enabled neural decompilation, but the generated code is typically only semantically plausible.<n>We propose ICL4Decomp, a hybrid decompilation framework that leverages in-context learning (ICL) to guide LLMs toward generating re-executable source code.
arXiv Detail & Related papers (2025-11-03T17:21:39Z) - D-LiFT: Improving LLM-based Decompiler Backend via Code Quality-driven Fine-tuning [49.16469288280772]
Decompilers reconstruct human-readable source code from binaries.<n>Despite recent advances, their outputs often suffer from syntactic and semantic errors and remain difficult to read.<n>With the advent of large language models (LLMs), researchers began to explore the potential of LLMs to refine decompiler output.<n>We present D-LIFT, an enhanced decompiler-LLM pipeline with fine-tuned reinforcement learning.
arXiv Detail & Related papers (2025-06-11T19:09:08Z) - ReF Decompile: Relabeling and Function Call Enhanced Decompile [50.86228893636785]
The goal of decompilation is to convert compiled low-level code (e.g., assembly code) back into high-level programming languages.<n>This task supports various reverse engineering applications, such as vulnerability identification, malware analysis, and legacy software migration.
arXiv Detail & Related papers (2025-02-17T12:38:57Z) - Refining Decompiled C Code with Large Language Models [15.76430362775126]
A C decompiler converts an executable into source code.
The recovered C source code, once re-compiled, is expected to produce an executable with the same functionality as the original executable.
arXiv Detail & Related papers (2023-10-10T11:22:30Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.