paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Finding Bugs in WebAssembly Interface Type Binding Generators

发现 WebAssembly 接口类型(WIT)绑定生成器中的缺陷
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 该论文研究 WebAssembly 组件绑定生成器的随机差分测试与缺陷发现,属于软件测试/代码生成方向;与用户关注的静态分析、LLM/Agent 改进程序分析、浮点程序分析或贝叶斯程序分析均无直接交叉。引用 0 inbox
Ethan Stanley, Eric Eide
crossref: 2026-09-12

AI 速览

一句话:提出针对 WIT 绑定生成器的随机差分测试框架,发现 7 个此前未知的代码生成缺陷。

WebAssembly 组件模型通过 WIT 绑定生成器为普通模块包裹绑定代码,使不同语言编译出的部件能够互操作。绑定代码生成中的错误会在组件应用中引发崩溃或静默数据损坏等难以诊断的运行时错误;然而已有 WebAssembly 测试工作只关注编译器与运行时,忽视了绑定生成器这一环节。本文是一篇经验论文,实现了一套针对 wit-bindgen 与 wit-bindgen-go 的随机差分测试系统:用不同高级语言编写行为应一致的程序,分别生成多个语义相同的 WebAssembly 组件,若其运行时行为出现差异,则怀疑某个生成的绑定存在缺陷。借助该框架,作者在两个生成器中发现了 7 个此前未知的代码生成缺陷,对它们进行了分析,并总结了可供未来绑定生成器测试借鉴的经验教训。

问题
WIT 绑定生成器的代码生成缺陷会导致 WebAssembly 组件在运行期崩溃或静默数据损坏,而现有 WebAssembly 测试研究只覆盖编译器与运行时,未关注绑定生成器。
方法
实现随机差分测试框架:用不同高级语言编写行为相同的程序,经 wit-bindgen 与 wit-bindgen-go 生成多个 WebAssembly 组件,比较其运行时行为差异以暴露绑定生成缺陷。
评估
在两个绑定生成器上运行该框架,发现并分析了 7 个此前未知的代码生成缺陷,并提炼出面向未来绑定生成器测试的经验教训。
原文摘要(Abstract)

The WebAssembly Component Model is an emerging standard for assembling applications from parts that are implemented in WebAssembly. Unlike ordinary WebAssembly modules, components implement their interfaces in a standardized way, enabling the interoperation of software parts compiled to WebAssembly from different programming languages. A component essentially wraps an ordinary module with binding code, created by a WebAssembly Interface Type (WIT) binding generator, to adapt the module to the WebAssembly component standard. Errors in the generation of binding code can lead to hard-to-diagnose run-time errors, including crashes and silent data corruption, in applications built from WebAssembly components. Prior published work on WebAssembly testing has focused on finding bugs in WebAssembly compilers and runtimes, and has overlooked the potential for bugs in the generation of binding code. In this experience paper, we detail and evaluate our approach to addressing this oversight.We implemented a system to perform random differential testing for two WIT binding generators, called wit-bindgen and wit-bindgen-go. Our system uses these binding generators to produce multiple WebAssembly components with the same behavior from programs written in different high-level languages. If the components’ run-time behaviors differ, we expect that there is a bug in one of the generated bindings. Using our framework, we discovered seven previously unknown code-generation defects in wit-bindgen and wit-bindgen-go. We analyze these bugs in this paper and, in addition, share lessons learned that can guide future efforts to test binding generators.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9374,
  title = {Finding Bugs in WebAssembly Interface Type Binding Generators},
  author = {Ethan Stanley and Eric Eide},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00025}
}