An Empirical Study of Bugs in WebAssembly Compilers

An Empirical Study of Bugs in WebAssembly Compilers
复制标题

DOI:
10.1109/ase51524.2021.9678776
复制
发表时间:
2021-11
期刊:
2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)
影响因子:
--
通讯作者:
Alan Romano;Xinyue Liu;Yonghwi Kwon;Weihang Wang
Alan Romano;Xinyue Liu;Yonghwi Kwon;Weihang Wang
中科院分区:
其他
文献类型:
--
作者:
Alan Romano;Xinyue Liu;Yonghwi Kwon;Weihang Wang

文献摘要

被引文献

相似文献

WebAssembly是Web的最新编程语言。它定义了一种便携式字节码格式,以用作使用高级语言(例如C,C ++和Rust)开发的程序的汇编目标。结果,Websembly二进制文件通常由Websembly编译器创建,而不是手动编写。要将本机代码端口到Web,WebAssembly编译器需要解决其执行环境中源和目标语言和差异之间的差异。对WebAssembly编译器中的错误有深入的了解可以帮助编译器开发人员确定在哪里集中开发和测试工作。在本文中,我们进行了两项经验研究,以了解Websembly编译器中发现的错误的特征。首先,我们对emscripten中的错误进行定性分析,这是最广泛使用的WebAssembly编译器。我们研究了与传统编译器相比,Emscripten中的146个错误报告与WebAssembly编译器遇到的独特挑战有关。其次,我们对三个开源WebAssembly编译器,汇编,Emscripten和Rustc/Wasm-bindgen进行了1,054个错误的定量分析。我们沿三个维度分析了这些错误:生命周期,撞击和诱导错误的输入和错误修复的大小。这些研究加深了我们对WebAssembly编译器错误的理解。我们希望我们的研究结果能够阐明设计用于测试和调试WebAssembly编译器的实用工具的机会。
WebAssembly is the newest programming language for the Web. It defines a portable bytecode format for use as a compilation target for programs developed in high-level languages such as C, C++, and Rust. As a result, WebAssembly binaries are generally created by WebAssembly compilers rather than being written manually. To port native code to the Web, WebAssembly compilers need to address the differences between the source and target languages and dissimilarities in their execution environments. A deep understanding of the bugs in WebAssembly compilers can help compiler developers determine where to focus development and testing efforts. In this paper, we conduct two empirical studies to understand the characteristics of the bugs found in WebAssembly compilers. First, we perform a qualitative analysis of bugs in Emscripten, the most widely-used WebAssembly compiler. We investigate 146 bug reports in Emscripten related to the unique challenges WebAssembly compilers encounter compared with traditional compilers. Second, we provide a quantitative analysis of 1,054 bugs in three open-source WebAssembly compilers, AssemblyScript, Emscripten, and Rustc/Wasm-Bindgen. We analyze these bugs along three dimensions: lifecycle, impact, and sizes of bug-inducing inputs and bug fixes. These studies deepen our understanding of WebAssembly compiler bugs. We hope that the findings of our study will shed light on opportunities to design practical tools for testing and debugging WebAssembly compilers.