Software often fails in the field, however reproducing and debugging field failures is very challenging: the failure-inducing input may be missing, and the program setup can be complicated and hard to reproduce by the developers. In this paper, we propose to generate fault signatures from the failure locations and the original source code to reproduce the faults in small executable programs. We say that a fault signature reproduces the fault in the original program if the two failed in the same location, triggered the same error conditions after executing the same selective sequences of failure-inducing statements. A fault signature aims to contain only sufficient statements that can reproduce the faults. That way, it provides some context to inform how a fault is developed and also avoids unnecessary complexity and setups that may block fault diagnosis. To compute fault signatures from the failures, we applied a path-sensitive static analysis tool to generate a path that leads to the fault, and then applied an existing syntactic patching tool to convert the path into an executable program. Our evaluation on real-world bugs from Corebench, BugBench, and Manybugs shows that fault signatures can reproduce the fault for the original programs. Because fault signatures are less complex, automatic test input generation tools generated failure-inducing inputs that could not be generated by using the entire programs. Some failure-inducing inputs can be directly transferred to the original programs. Our experimental data are publicly available at https://doi.org/10.5281/zenodo.5430155.
翻译:软件常常在现场环境中失效,然而复现和调试现场失效极具挑战性:失效诱导输入可能缺失,程序配置可能复杂且难以由开发人员复现。本文提出从失效位置和原始源代码生成故障特征,以在小型可执行程序中复现故障。若原始程序与故障特征在同一位置失效,且执行相同的选择性失效诱导语句序列后触发相同的错误条件,则称故障特征复现了原始程序中的故障。故障特征旨在仅包含足以复现故障的语句,从而提供揭示故障演化过程的上下文信息,同时避免可能阻碍故障诊断的不必要复杂性和配置。为了从失效中计算故障特征,我们采用路径敏感的静态分析工具生成导向故障的路径,并应用现有语法补丁工具将路径转化为可执行程序。在Corebench、BugBench和Manybugs真实世界缺陷上的评估表明,故障特征能够复现原始程序中的故障。由于故障特征复杂度较低,自动测试输入生成工具能够生成使用完整程序时无法获得的失效诱导输入,且部分失效诱导输入可直接迁移至原始程序。实验数据已公开发布于https://doi.org/10.5281/zenodo.5430155。