一句话:提出 Decov,以调试器的逐行命中计数作为异构信息源,构造异构关系来检测覆盖率剖析器的缺陷。
代码覆盖率被广泛用于各类软件工程任务,因此覆盖率剖析器本身的正确性至关重要。现有验证技术(差分测试、蜕变测试)依赖同质来源,即不同剖析器之间或剖析器自身的比较,存在局限。本文提出 Decov:以调试器作为异构信息源,利用调试器在调试模式下监控的每行命中次数,与覆盖率剖析器记录的每行执行次数应当一致且无冲突这一洞察,构造多条异构关系来暴露剖析器缺陷。作者在广泛使用的 Gcov 与 LLVM-cov 上进行实验,共提交 21 个新缺陷报告,其中 19 个被开发者直接确认,5 个已在最新 trunk 版本中修复,表明 Decov 是一种简单有效且与现有技术互补的剖析器验证方法。
Ensuring the correctness of code coverage profilers is crucial, given the widespread adoption of code coverage for various software engineering tasks. Existing validation techniques, such as differential testing and metamorphic testing, have shown effectiveness in uncovering bugs in coverage profilers. However, these techniques have limitations as they primarily rely on homogeneous sources, i.e., different coverage profilers or the profilers themselves, for validation. In this paper, we propose Decov, a novel heterogeneous testing technique, to validate coverage profilers using the information provided by debuggers as a heterogeneous source. Coverage profilers record execution counts for each source line in the program, while debuggers monitor hit counts for each source line when running the program in debug mode. Our key insight is that the execution counts obtained from coverage profilers should align with the hit counts monitored by debuggers, without conflicts. Decov constructs multiple heterogeneous relations and utilizes them to uncover bugs in coverage profilers. Through experiments on Gcov and LLVM-cov, two widely used code coverage profilers, we discovered 21 new bug reports, with 19 of them directly confirmed by developers. Notably, developers have resolved 5 bugs in the latest trunk version. Decov serves as a simple yet effective coverage profiler validator and offers a complementary approach to existing techniques.
@inproceedings{YangSWL0Z23,
title = {Heterogeneous Testing for Coverage Profilers Empowered with Debugging Support},
author = {Yibiao Yang and Maolin Sun and Yang Wang and Qingyang Li and Ming Wen and Yuming Zhou},
booktitle = {FSE},
year = {2023},
doi = {10.1145/3611643.3616340}
}