一句话:首个系统研究 WebAssembly 调用图构建的挑战,构建 24 个微基准并揭示现有分析均不健全。
WebAssembly 是支撑浏览器、服务端与独立运行时的底层字节码,调用图是众多过程间静态分析与优化的核心。但 WebAssembly 给静态调用图构建带来独特挑战,这些挑战既未被充分理解,也不清楚现有技术解决得如何。本文首次系统研究此类挑战与最新分析技术:识别并分类 12 类挑战,编码为 24 个可执行微基准,并测量其在 8000 多个真实二进制中的普遍性;再基于微基准和可执行真实二进制评估 4 种现有分析的健全性与精度。结果表明挑战普遍存在,且所有现有技术都不健全,此前未见文档记载。作者期望该工作指导改进 WebAssembly 调用图构建,微基准可检验分析对挑战特性的支持并量化其健全性与精度。
WebAssembly is a low-level bytecode format that powers applications and libraries running in browsers, on the server side, and in standalone runtimes. Call graphs are at the core of many interprocedural static analysis and optimization techniques. However, WebAssembly poses some unique challenges for static call graph construction. Currently, these challenges are neither well understood, nor is it clear to what extent existing techniques address them. This paper presents the first systematic study of WebAssembly-specific challenges for static call graph construction and of the state-of-the-art in call graph analysis. We identify and classify 12 challenges, encode them into a suite of 24 executable microbenchmarks, and measure their prevalence in real-world binaries. These challenges reflect idiosyncrasies of WebAssembly, such as indirect calls via a mutable function table, interactions with the host environment, and unmanaged linear memory. We show that they commonly occur across a set of more than 8,000 real-world binaries. Based on our microbenchmarks and a set of executable real-world binaries, we then study the soundness and precision of four existing static analyses. Our findings include that, surprisingly, all of the existing techniques are unsound, without this being documented anywhere. We envision our work to provide guidance for improving static call graph construction for WebAssembly. In particular, the presented microbenchmarks will enable future work to check whether an analysis supports challenging language features, and to quantify its soundness and precision.
@inproceedings{0002TTP23,
title = {That’s a Tough Call: Studying the Challenges of Call Graph Construction for WebAssembly},
author = {Daniel Lehmann and Michelle Thalakottur and Frank Tip and Michael Pradel},
booktitle = {ISSTA},
year = {2023},
doi = {10.1145/3597926.3598104}
}