一句话:提出 Cod 工具,基于蜕变关系自动自验证代码覆盖率剖析器,零误报发现 gcov 与 llvm-cov 的缺陷。
代码覆盖率作为基础动态程序行为信息,广泛支撑测试、模糊测试、调试、缺陷检测与程序理解等任务,因此覆盖率剖析器的可靠性至关重要。然而相关研究不足且存在测试预言问题,gcov、llvm-cov 等常用工具仍频繁出现缺陷。本文提出 Cod,一个自动化自验证方法:它以编译器测试套件程序或随机生成程序为输入,在原程序与变异变体之间建立覆盖率统计的蜕变关系,零误报检测剖析器缺陷。在 gcov 和 llvm-cov 上的四个月评估共发现 196 个潜在缺陷(gcov 123、llvm-cov 73),其中 23 个已获开发者确认。
Code coverage as the primitive dynamic program behavior information, is widely adopted to facilitate a rich spectrum of software engineering tasks, such as testing, fuzzing, debugging, fault detection, reverse engineering, and program understanding. Thanks to the widespread applications, it is crucial to ensure the reliability of the code coverage profilers. Unfortunately, due to the lack of research attention and the existence of testing oracle problem, coverage profilers are far away from being tested sufficiently. Bugs are still regularly seen in the widely deployed profilers, like gcov and llvm-cov, along with gcc and llvm, respectively. This paper proposes Cod, an automated self-validator for effectively uncovering bugs in the coverage profilers. Starting from a test program (either from a compiler's test suite or generated randomly), Cod detects profiler bugs with zero false positive using a metamorphic relation in which the coverage statistics of that program and a mutated variant are bridged. We evaluated Cod over two of the most well-known code coverage profilers, namely gcov and llvm-cov. Within a four-month testing period, a total of 196 potential bugs (123 for gcov, 73 for llvm-cov) are found, among which 23 are confirmed by the developers.
DOI 原文 ·
@inproceedings{paperbot5188,
title = {Automatic Self-Validation for Code Coverage Profilers},
author = {Yibiao Yang and Yanyan Jiang and Zhiqiang Zuo and Yang Wang and Hao Sun and Hongmin Lu and Yuming Zhou and Baowen Xu},
booktitle = {ASE},
year = {2019},
doi = {10.1109/ase.2019.00018}
}