paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Hunting for Bugs in Code Coverage Tools via Randomized Differential Testing

通过随机差分测试寻找代码覆盖率工具中的缺陷
ICSE 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)2019匹配度 2/10 · 该论文研究代码覆盖率工具的随机差分测试与缺陷检测,属于软件测试/调试方向,与用户关注的静态分析、LLM/Agent 与程序分析交叉、浮点程序分析及贝叶斯程序分析等核心方向均无直接关联。引用 32 inbox
Yibiao Yang, Yuming Zhou, Hao Sun, Zhendong Su, Zhiqiang Zuo, Lei Xu, Baowen Xu
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出随机差分测试方法,通过检测 C 代码覆盖率工具报告不一致来发现大量缺陷。

代码覆盖率工具广泛用于测试、模糊测试与调试等质量保障活动,但其自身可靠性鲜受关注。本文提出随机差分测试方法:生成随机输入程序,比较不同 C 代码覆盖率工具产生的覆盖率报告,将不一致视为潜在覆盖率缺陷。为有效报告缺陷,作者解决三个挑战:过滤触发同一缺陷的重复测试程序、自动将大程序缩减为保持相同性质的小程序、判定哪个工具存在缺陷。广泛评估验证了方法有效性,在 gcov 和 llvm-cov 中分别确认或修复 42 个和 28 个缺陷;案例表明覆盖率工具并不如预期可靠,亟需持续改进其可靠性,并开辟了覆盖率验证的新方向。

问题
代码覆盖率工具被广泛依赖,但其自身可靠性缺乏系统评估;论文探究如何自动发现这些工具中导致覆盖率报告错误的缺陷。
方法
采用随机差分测试:生成随机 C 程序,比较多个代码覆盖率工具的覆盖率报告,并通过重复程序过滤、测试程序缩减和缺陷归属判定来报告不一致。
评估
在广泛使用的 C 代码覆盖率工具上评估,gcov 和 llvm-cov 分别确认或修复 42 与 28 个缺陷,验证了方法有效性并揭示其可靠性问题。
原文摘要(Abstract)

Reliable code coverage tools are critically important as it is heavily used to facilitate many quality assurance activities, such as software testing, fuzzing, and debugging. However, little attention has been devoted to assessing the reliability of code coverage tools. In this study, we propose a randomized differential testing approach to hunting for bugs in the most widely used C code coverage tools. Specifically, by generating random input programs, our approach seeks for inconsistencies in code coverage reports produced by different code coverage tools, and then identifies inconsistencies as potential code coverage bugs. To effectively report code coverage bugs, we addressed three specific challenges: (1) How to filter out duplicate test programs as many of them triggering the same bugs in code coverage tools; (2) how to automatically reduce large test programs to much smaller ones that have the same properties; and (3) how to determine which code coverage tools have bugs? The extensive evaluations validate the effectiveness of our approach, resulting in 42 and 28 confirmed/fixed bugs for gcov and llvm-cov, respectively. This case study indicates that code coverage tools are not as reliable as it might have been envisaged. It not only demonstrates the effectiveness of our approach, but also highlights the need to continue improving the reliability of code coverage tools. This work opens up a new direction in code coverage validation which calls for more attention in this area.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{YangZSS00X19,
  title = {Hunting for Bugs in Code Coverage Tools via Randomized Differential Testing},
  author = {Yibiao Yang and Yuming Zhou and Hao Sun and Zhendong Su and Zhiqiang Zuo and Lei Xu and Baowen Xu},
  booktitle = {ICSE},
  year = {2019},
  doi = {10.1109/icse.2019.00061}
}