History-Driven Test Program Synthesis for JVM Testing

History-Driven Test Program Synthesis for JVM Testing
复制标题

DOI:
10.1145/3510003.3510059
复制
发表时间:
2022-05
期刊:
2022 IEEE/ACM 44th International Conference on Software Engineering (ICSE)
影响因子:
--
通讯作者:
Yingquan Zhao;Zan Wang;Junjie Chen;Mengdi Liu;Mingyuan Wu;Yuqun Zhang;Lingming Zhang
Yingquan Zhao;Zan Wang;Junjie Chen;Mengdi Liu;Mingyuan Wu;Yuqun Zhang;Lingming Zhang
中科院分区:
其他
文献类型:
--
作者:
Yingquan Zhao;Zan Wang;Junjie Chen;Mengdi Liu;Mingyuan Wu;Yuqun Zhang;Lingming Zhang

文献摘要

相似文献

Java虚拟机(Java Virtual Machine, JVM)为Java程序提供了运行时环境,使得Java可以“一次编写,随处运行”。JVM对于运行在其上的所有Java程序的正确性起着决定性的作用。因此,确保JVM实现的正确性和健壮性对于Java程序至关重要。迄今为止,已经提出了各种技术,通过生成潜在的bug揭示测试程序来暴露JVM bug。然而,现有研究生成的测试程序的多样性和有效性远远不够,因为它们主要集中在次要的语法/语义突变上。在本文中,我们提出了JavaTailor,这是第一个历史驱动的测试程序合成技术,它通过将从JVM历史bug揭示测试程序中提取的成分编织成种子程序来合成各种测试程序,以覆盖更多的JVM行为/路径。更具体地说,JavaTailor首先从历史bug揭示测试程序中提取五种类型的代码成分。然后,为了合成不同的测试程序,它迭代地将提取的成分插入到种子程序中,并通过在它们之间引入额外的数据依赖关系来加强它们之间的相互作用。最后,JavaTailor使用这些合成的测试程序对jvm进行不同的测试。我们在流行的JVM实现(即HotSpot和OpenJ9)上的实验结果表明,JavaTailor在生成更多样化和更有效的测试程序方面优于最先进的技术,例如,由JavaTailor生成的测试程序可以实现更高的JVM代码覆盖率,并比最先进的技术检测到更多独特的不一致性。此外,JavaTailor已经检测到10个以前未知的bug,其中6个已经被开发人员确认/修复。
Java Virtual Machine (JVM) provides the runtime environment for Java programs, which allows Java to be “write once, run anywhere”. JVM plays a decisive role in the correctness of all Java programs running on it. Therefore, ensuring the correctness and robustness of JVM implementations is essential for Java programs. To date, various techniques have been proposed to expose JVM bugs via generating potential bug-revealing test programs. However, the diversity and effectiveness of test programs generated by existing research are far from enough since they mainly focus on minor syntactic/semantic mutations. In this paper, we propose JavaTailor, the first history-driven test program synthesis technique, which synthesizes diverse test programs by weaving the ingredients extracted from JVM historical bug-revealing test programs into seed programs for covering more JVM behaviors/paths. More specifically, JavaTailor first extracts five types of code ingredients from the historical bug-revealing test programs. Then, to synthesize diverse test programs, it iteratively inserts the extracted ingredients into the seed programs and strengthens their interactions via introducing extra data dependencies between them. Finally, JavaTailor employs these synthesized test programs to differentially test JVMs. Our experimental results on popular JVM implementations (i.e., HotSpot and OpenJ9) show that JavaTailor outperforms the state-of-the-art technique in generating more diverse and effective test programs, e.g., test programs generated by JavaTailor can achieve higher JVM code coverage and detect many more unique inconsistencies than the state-of-the-art technique. Furthermore, JavaTailor has detected 10 previously unknown bugs, 6 of which have been confirmed/fixed by developers.