arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.11950cs.SEcs.AIcs.CLcs.CR
收藏

AnyPoC:用于可扩展LLM基于Bug检测的通用证明-概念测试生成

AnyPoC: Universal Proof-of-Concept Test Generation for Scalable LLM-Based Bug Detection

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Zijie Zhao, Chenyuan Yang, Weidong Wang, Yihan Yang, Ziqi Zhang, Lingming Zhang

AI总结:

AnyPoC通过多代理框架生成可执行的证明-概念测试,以验证候选Bug报告,提升自动化Bug检测的实用性。

摘要:

尽管最近的基于LLM的代理能够识别许多源代码中的候选Bug,但它们的报告仍然是静态假设,需要手动验证,限制了自动化Bug检测的实用性。我们将其挑战框架为测试生成任务:给定一个候选报告,合成可执行的证明-概念测试,即脚本、命令序列或定制输入,以触发疑似缺陷。自动化PoC生成可以作为可扩展的验证Oracle,通过提供具体的执行证据实现端到端的自主Bug检测。然而,朴素的LLM代理是不可靠的验证器:它们倾向于“成功”并且可能通过生成看似合理但不工作的PoC或甚至幻觉轨迹来奖励黑客。为了解决这个问题,我们提出了AnyPoC,一个通用的多代理框架,它(1)分析并验证候选Bug报告,(2)迭代合成并执行PoC同时收集执行轨迹,(3)独立重新执行并审查PoC以缓解幻觉和奖励黑客。此外,AnyPoC还连续提取和演变PoC知识库以处理异构任务。AnyPoC在候选Bug报告上运行,无论其来源如何,可以与不同的Bug报告者配对。为了证明实用性和通用性,我们应用AnyPoC,配合一个简单的代理Bug报告者,在12个关键软件系统上进行测试,涵盖多种语言/领域(许多有数百万行代码),包括Firefox、Chromium、LLVM、OpenSSL、SQLite、FFmpeg和Redis。与最先进的编码代理,例如Claude Code和Codex相比,AnyPoC为真正的正向Bug报告生成1.3倍的有效的PoC,并拒绝9.8倍的假阳性Bug报告。截至目前,AnyPoC发现了122个新Bug(105个确认,86个已修复),其中45个生成的PoC被采用为官方回归测试。

英文摘要:

While recent LLM-based agents can identify many candidate bugs in source code, their reports remain static hypotheses that require manual validation, limiting the practicality of automated bug detection. We frame this challenge as a test generation task: given a candidate report, synthesizing an executable proof-of-concept (PoC) - such as a script, command sequence, or crafted input - to trigger the suspected defect. Automated PoC generation can act as a scalable validation oracle, enabling end-to-end autonomous bug detection by providing concrete execution evidence. However, naive LLM agents are unreliable validators: they are biased toward "success" and may reward-hack by producing plausible but non-functional PoCs or even hallucinated traces. To address this, we present ANYPoC, a general multi-agent framework that (1) analyzes and fact-checks a candidate bug report, (2) iteratively synthesizes and executes a PoC while collecting execution traces, and (3) independently re-executes and scrutinizes the PoC to mitigate hallucination and reward hacking. In addition, ANYPoC also continuously extracts and evolves a PoC knowledge base to handle heterogeneous tasks. ANYPoC operates on candidate bug reports regardless of their source and can be paired with different bug reporters. To demonstrate practicality and generality, we apply ANYPoC, together with a simple agentic bug reporter, on 12 large-scale, critical software systems, including Firefox, Chromium, LLVM, OpenSSL, SQLite, FFmpeg, and Redis. Compared to the state-of-the-art coding agents, e.g., Claude Code and Codex, ANYPoC produces 37% more valid PoCs for true-positive bug reports and rejects 9.7x more false-positive bug reports. ANYPoC also enables the discovery of 121 new bugs from over two thousand noisy bug reports, with 108 confirmed by developers and 92 fixed. 46 PoCs have also been adopted as official regression tests.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑