一句话:提出 D3,利用测试程序、优化和测试执行三个维度的缺陷因果特征度量失败距离,实现静默编译器缺陷去重。
针对编译器测试中同一缺陷导致大量重复失败、而静默(错误代码)缺陷缺少崩溃信息难以去重的问题,本文提出 D3 技术。其核心思想是从测试过程中刻画静默缺陷,提取测试程序、优化和测试执行三个维度的信息用于去重;由于三维信息中存在大量与缺陷无关的细节,D3 通过因果分析系统地从每个维度识别缺陷因果特征,并据此度量测试失败之间的距离,将更可能由不同静默缺陷引起的失败排在前面。在包含 GCC 与 LLVM 重复缺陷的四个数据集上,D3 在分析相同数量测试失败时识别唯一静默缺陷的能力显著优于两种最先进的编译器缺陷去重技术,平均提升 19.36% 与 51.43%。
Compiler testing is an important task for assuring the quality of compilers, but investigating test failures is very time-consuming. This is because many test failures are caused by the same compiler bug (known as bug duplication problem). In particular, this problem becomes much more challenging on silent compiler bugs (also called wrong code bugs), since these bugs can provide little information (unlike crash bugs that can produce error messages) for bug de-duplication. In this work, we propose a novel technique (called D3) to solve the duplication problem on silent compiler bugs. Its key insight is to characterize the silent bugs from the testing process and identify three-dimensional information (i.e., test program, optimizations, and test execution) for bug de-duplication. However, there are huge amount of bug-irrelevant details on the three dimensions, D3 then systematically conducts causal analysis to identify bug-causal features from each of the three dimensions for more accurate bug de-duplication. Finally, D3 ranks the test failures that are more likely to be caused by different silent bugs higher by measuring the distance among test failures based on the three-dimensional bug-causal features. Our experimental results on four datasets (including duplicate bugs of both GCC and LLVM) demonstrate the significant superiority of D3 over the two state-of-the-art compiler bug de-duplication techniques, achieving the average improvement of 19.36% and 51.43% in identifying unique silent compiler bugs when analyzing the same number of test failures.