论文标题
通过测试移植和差分测试在JavaScript引擎中暴露错误
Exposing Bugs in JavaScript Engines through Test Transplantation and Differential Testing
论文作者
论文摘要
语境。 JavaScript是当今流行的编程语言,其中有几种实施争夺市场优势。尽管存在指导发动机开发的规范文档和一致性测试套件,但发生了错误并产生重要的实际后果。实施正确的发动机是具有挑战性的,因为规格有意不完整并且经常发展。客观的。本文研究了使用测试移植和差异测试在JavaScript引擎中揭示功能错误的使用。以前的技术运行了另一个发动机上给定引擎的回归测试套件。后一种技术构成现有输入,然后比较不同发动机与差分甲骨文产生的输出。方法。我们对五个主要播放器,Facebook,Google,Microsoft和Mozilla的引擎进行了实验,以评估测试移植和差异测试的有效性。结果。我们的结果表明,这两种技术都揭示了几个错误,其中许多错误由开发人员确认。我们报告了35次进行测试移植的错误(这些错误中有23个已确认和19个固定),并报告了24个带有差异测试的错误(其中17个已确认和10个固定)。结果表明,这些错误中的大多数影响了两个引擎苹果的JSC和Microsoft的Chakracore(分别为24和26个错误)。总而言之,我们的结果表明,在复杂软件(例如JavaScript引擎)中查找错误,可以易于应用测试移植和差异测试。
Context. JavaScript is a popular programming language today with several implementations competing for market dominance. Although a specification document and a conformance test suite exist to guide engine development, bugs occur and have important practical consequences. Implementing correct engines is challenging because the spec is intentionally incomplete and evolves frequently. Objective. This paper investigates the use of test transplantation and differential testing for revealing functional bugs in JavaScript engines. The former technique runs the regression test suite of a given engine on another engine. The latter technique fuzzes existing inputs and then compares the output produced by different engines with a differential oracle. Method. We conducted experiments with engines from five major players-Apple, Facebook, Google, Microsoft, and Mozilla-to assess the effectiveness of test transplantation and differential testing. Results. Our results indicate that both techniques revealed several bugs, many of which confirmed by developers. We reported 35 bugs with test transplantation (23 of these bugs confirmed and 19 fixed) and reported 24 bugs with differential testing (17 of these confirmed and 10 fixed). Results indicate that most of these bugs affected two engines-Apple's JSC and Microsoft's ChakraCore (24 and 26 bugs, respectively). To summarize, our results show that test transplantation and differential testing are easy to apply and very effective in finding bugs in complex software, such as JavaScript engines.