DebugHarness : Emulating Human Dynamic Debugging for Autonomous Program Repair CCS: Software and its engineering Software testing and debugging CCS: Security and privacy Vulnerability management

Maolin Sun, Yibiao Yang, Xuanling Liu, Yuming Zhou, Baowen Xu · 2026

Read DebugHarness : Emulating Human Dynamic Debugging for Autonomous Program Repair CCS: Software and its engineering Software testing and debugging CCS: Security and privacy Vulnerability management by Maolin Sun, Yibiao Yang, Xuanling Liu, Yuming Zhou, Baowen Xu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-03610.txt.

Introduction

Sun and colleagues introduce DebugHarness, a self-running LLM-powered debugging agent that copies human live debugging for program repair. Driven by a crash that repeats, it forms guesses, probes memory states and run paths, and builds patches through a closed-loop checking cycle. Tested on SEC-bench, a dataset of real C/C++ security flaws, it patches about 90 percent of tested bugs. That is over 30 percent better than state-of-the-art baselines.

Catalog record

CREATORMaolin Sun, Yibiao Yang, Xuanling Liu, Yuming Zhou, Baowen Xu
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE59331
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.03610

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

DebugHarness : Emulating Human Dynamic Debugging for Autonomous Program Repair CCS: Software and its engineering Software testing and debugging CCS: Security and privacy Vulnerability management Maolin Sun, Yibiao Yang, Xuanling Liu, Yuming Zhou, Baowen Xu Abstract . Patching severe security flaws in complex software remains a major challenge. While automated tools like fuzzers efficiently discover bugs, fixing deep-rooted low-level faults (e.g., use-after-free and memory corruption) still requires labor-intensive manual analysis by experts. Emerging Large Language Model (LLM) agents attempt to automate this pipeline, but they typically treat bug fixing as a purely static code-generation task. Relying solely on static artifacts, these methods miss the dynamic execution context strictly necessary for diagnosing intricate memory safety violations. To overcome these limitations, we introduce DebugHarness , an autonomous LLM-powered debugging agent harness that resolves complex vulnerabilities by emulating the interactive debugging practices of human systems engineers. Instead of merely examining static code, DebugHarness actively queries the live runtime environment. Driven by a reproducible crash, it utilizes a pattern-guided investigation strategy to formulate hypotheses, interactively probes program memory states and execution paths, and synthesizes patches via a closed-loop validation cycle. We evaluate DebugHarness on SEC-bench, a rigorous dataset of real-world C/C++ security vulnerabilities. DebugHarness successfully patches approximately 90% of the evaluated bugs. This yields a relative improvement of over 30% compared to state-of-the-art baselines, demonstrating that dynamic debugging significantly enhances LLM diagnostic capabilities. Overall, DebugHarness establishes a novel paradigm for automated program repair, bridging the gap between static LLM reasoning and the dynamic intricacies of low-level systems programming. 1. Introduction As software systems grow in scale and complexity, critical security vulnerabilities have become increasingly prevalent ( 1 ; 10 ) . For instance, in crucial system software like the Linux kernel ( 6 ) , over 200 security vulnerabilities are disclosed each year on average ( 22 ) . This challenge is further compounded by the rapid adoption of AI-assisted code generation, which frequently introduces subtle flaws into production codebases ( 65 ) . While automated vulnerability detection techniques, most notably fuzz testing, have successfully scaled to identify thousands of bugs in production systems ( 48 ; 37 ) , the subsequent mitigation phase remains a severe bottleneck. Resolving deep-rooted software crashes, particularly those involving memory corruption or complex state violations, fundamentally relies on domain expertise and exhaustive manual debugging. Consequently, the widening gap between vulnerability discovery and patch deployment imposes substantial security risks and maintenance costs ( 2 ; 21 ; 36 ) . To address this mitigation bottleneck, the research community has increasingly explored Automated Program Repair (APR) ( 32 ; 28 ) and LLM-based software engineering agents ( 54 ; 58 ; 4 ; 62 ) . By leveraging the code-comprehension capabilities of LLMs, these frameworks attempt to autonomously localize faults and synthesize patches. However, despite achieving impressive results on standard benchmarks ( 23 ) , current systems fundamentally treat vulnerability repair as a static text-generation problem ( 57 ; 51 ; 53 ) . They typically rely on static artifacts, such as issue reports, basic stack traces, and source code, without reasoning about the program’s dynamic execution state. While this static approach is effective for relatively straightforward bugs in high-level languages (e.g., Python projects in SWE-bench ( 24 ) ), it struggles to resolve complex, real-world security vulnerabilities that demand a nuanced comprehension of dynamic behavior and memory layouts ( 30 ) . In practice, this reliance on static analysis stands in stark contrast to how systems experts debug complex vulnerabilities. When human developers encounter a native crash, they do not merely analyze a static codebase. Instead, they employ interactive debuggers (e.g., GDB ) to inspect raw memory and register states, augmentation tools (e.g., pwndbg ( 9 ) ) for memory and heap introspection, and deterministic replay (e.g., rr ( 43 ) ) to trace the propagation of corrupted states from the crash site back to the root cause. Moreover, distinct vulnerability classes, such as heap corruptions or use-after-free errors, demand potentially different debugging strategies and tool invocations. Even recent efforts ( 59 ; 63 ) that attempt to mimic human debugging workflows with LLMs still largely relegate the agent to the role of a passive code reader, limited to language server queries that fetch static code information without any dynamic execution context. By overlooking this interactive, dynamic debugging process, existing LLM-based agents may miss critical execution context. We argue that the rich, dynamic state derived from live execution is essential to resolve non-trivial memory safety crashes. Our Approach. To address this gap, we introduce DebugHarness , an autonomous debugging harness 1 1 1 In the context of LLM agents, a harness provides an operating system-like abstraction ( 47 ) . It treats the language model as the central reasoning processor while managing the execution state (analogous to memory) and exposing standardized interfaces (drivers) for external tool invocation. that orchestrates LLM-driven analysis through dynamic execution state introspection. DebugHarness operates as an end-to-end harness built on two core mechanisms: signature-driven investigation and interactive state introspection . Specifically, the workflow initiates with a reproducible Proof-of-Concept (PoC) trigger, typically sourced from a fuzzing campaign or an issue report. By analyzing the initial crash signature, DebugHarness classifies the vulnerability type and dynamically injects type-specific debugging guidelines into the LLM’s context. This signature-driven investigation strategy directs the agent’s attention to the most relevant memory states and execution traces, effectively mirroring the specialized approaches of human experts. During the diagnostic phase, DebugHarness is allowed to map sanitizer trap information to the corresponding source code via a language server, which provides the necessary static context for the LLM. Additionally, to establish a dynamic understanding of the program state, the interactive state introspection component empowers the LLM to orchestrate a specialized suite of systems tools. This includes standard debuggers (e.g., GDB ) for execution control, debugger augmentation tools (e.g., pwndbg ) for deep memory and heap introspection, and record-and-replay systems (e.g., rr ) for deterministic reverse execution. Guided by the signature-driven investigation strategy, the agent iteratively formulates hypotheses regarding the root cause and actively interacts with these tools to verify its assumptions if needed. By bridging the gap between static information and dynamic introspection, DebugHarness acquires the precise contextual information required to diagnose memory safety issues. Ultimately, upon pinpointing the root cause, DebugHarness synthesizes a patch and attempts validation by recompiling the target application and re-executing the PoC trigger. Should the patch fail validation, DebugHarness seamlessly feeds the resulting compiler warnings or subsequent crash logs back into the agent’s context, initiating a new refinement iteration. This structured, closed-loop workflow grounds the LLM’s reasoning in empirical, dynamic observations. Consequently, this structured, closed-loop workflow mitigates divergent agent behavior (e.g., hallucination) and enables DebugHarness to successfully resolve intricate vulnerabilities that defeat state-of-the-art static LLM agents. Results. To evaluate the efficacy of DebugHarness , we conducted an extensive empirical study using SEC-bench ( 30 ) , a rigorous benchmark comprising 200 real-world security vulnerabilities across 29 popular open-source C/C++ projects. Our evaluation demonstrates that by reasoning over dynamic memory states and execution traces, DebugHarness successfully resolves complex vulnerabilities that evade state-of-the-art static LLM agents. Specifically, DebugHarness achieves a resolution rate of approximately 90% across the benchmark, outperforming well-known baselines, e.g., PatchAgent (

Read the complete text