Wasmgrind: Towards Dynamic Concurrency Analysis for Multithreaded WebAssembly
The \textit{threads proposal} introduced language constructs for multithreaded execution of WebAssembly programs. However, concurrent memory accesses and the erroneous use of synchronization primitives impose the risk of deadlocks and data races during program execution. While there are tools to detect this kind of errors on native platforms, WebAssembly still lacks appropriate tooling for analyzing these issues.
To this end we present \textit{Wasmgrind}, an instrumentation framework targeted at prediction of deadlocks and data races for multithreaded WebAssembly programs. It defines an embedder-agnostic ABI of WebAssembly imports and exports that enables thread creation and joining independent of the WebAssembly runtime. WebAssembly programs utilizing this ABI can be instrumented and executed by Wasmgrind to generate an execution trace for offline concurrency analysis.