Finding Bugs in WebAssembly Interface Type Binding Generators
Ethan Stanley, Eric Eide
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.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 3c3fb400-7c31-4fb1-b1d7-55ecdb304162Related papers
- WITFuzz: Validity-Preserving Greybox Fuzzing for WebAssembly Interface Type Binding GeneratorsHanqin Guan, Ningyu He, Shangtong Cao, Yifeng Cai et al.ISSTA 2026
- WADIFF: A Differential Testing Framework for WebAssembly RuntimesShiyao Zhou, Muhui Jiang, Weimin Chen, Hao Zhou et al.ASE 2023 · 14 citations
- WASIT: Deep and Continuous Differential Testing of WebAssembly System Interface ImplementationsYage Hu, Wen Zhang, Botang Xiao, Qingchen Kong et al.SOSP 2025
- An Empirical Study of Bugs in WebAssembly CompilersAlan Romano, Xinyue Liu, Yonghwi Kwon, Weihang WangASE 2021 · 43 citations
- LWDIFF: an LLM-Assisted Differential Testing Framework for Webassembly RuntimesShiyao Zhou, Jincheng Wang, He Ye, Hao Zhou et al.ICSE 2025 · 2 citations
