From Raw Pointers to Memory Safety: A Modular Demand-Driven Typestate Analysis for Rust
Proceedings of the ACM on Programming Languages · 10.04.2026 · 10 (OOPSLA1) · 1817-1845
DOI: 10.1145/3798266 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the ACM on Programming Languages, online erschienen am 10.04.2026. Verfasst von Wei Li und 2 weiteren Autor:innen. Die Arbeit wurde bisher 1-mal zitiert (Crossref) und nennt 67 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Australian Research Council.
Abstract (Originalsprache)
Rust combines high performance with strong memory safety through strict ownership and borrowing rules. However, its unsafe mode reintroduces vulnerabilities by allowing raw-pointer manipulation, a major source of memory-safety bugs. Existing whole-program analyses for Rust often suffer from low recall and high false positives. Since unsafe code is typically small and isolated, we propose a demand-driven alternative. We present Pincer , a flow-, field-, and context-sensitive dataflow analysis framework built on IFDS. Pincer performs mutually bidirectional analysis—backward to trace raw-pointer origins and forward to explore aliases—adapting this strategy to Rust’s ownership model and low-level semantics. On this foundation, Pincer performs a modular, bottom-up vulnerability-oriented typestate analysis to detect use-after-free and double-free bugs. It tracks raw-pointer aliasing and nullness, exploits strong updates at container-manipulating returns, and leverages Rust’s safety invariants to prune provably safe regions via AXM checking. The modular design enables controlled exploration, optionally under a budget, improving scalability. Controlled unsoundness further boosts efficiency while maintaining high recall and precision. We evaluate Pincer on vulnerable programs and large Rust projects. The results show that Pincer detects memory-safety errors more accurately than state-of-the-art analyses while maintaining practical efficiency.
Förderung
- Australian Research Council
Zitieren
APA
Li, W., Chen, W., & Xue, J. (2026). From Raw Pointers to Memory Safety: A Modular Demand-Driven Typestate Analysis for Rust. Proceedings of the ACM on Programming Languages, 10(OOPSLA1), 1817-1845. https://doi.org/10.1145/3798266
Vancouver
Li W, Chen W, Xue J. From Raw Pointers to Memory Safety: A Modular Demand-Driven Typestate Analysis for Rust. Proceedings of the ACM on Programming Languages. 2026;10(OOPSLA1):1817-1845. doi:10.1145/3798266
BibTeX
@article{Li2026,
author = {Li, Wei and Chen, Wenyao and Xue, Jingling},
title = {From Raw Pointers to Memory Safety: A Modular Demand-Driven Typestate Analysis for Rust},
journal = {Proceedings of the ACM on Programming Languages},
year = {2026},
volume = {10},
number = {OOPSLA1},
pages = {1817--1845},
doi = {10.1145/3798266}
}
EUVIMED