Beyond Compile-Time Safety: Strengthening Rust’s Ecosystem with Program Analysis and Programmability Support

Description

Rust is a relatively young programming language designed to enable the development of safe and efficient systems software. Its core philosophy is to eliminate memory and concurrency bugs through strict compile-time safety checks, while maintaining runtime performance of compiled programs comparable to C. Rust relies on LLVM as its compiler backend, which allows many existing testing tools originally developed for C/C++ to be reused for detecting bugs that escape the compiler’s safety guarantees. Thanks to its strong safety features and high performance, Rust has gained significant popularity in recent years and is increasingly adopted for building safety-critical software systems.

Our work focuses on enhancing the Rust toolchain by addressing two key research questions. First, how can we identify and mitigate the programming challenges introduced by Rust’s strict safety checks? Second, how can we improve the efficiency and effectiveness of applying existing C/C++ techniques to Rust programs? Specifically, we are 1) identifying programming challenges caused by Rust’s safety checks and addressing them through novel visualization techniques, 2) improving the effectiveness of existing test input generation techniques for Rust, 3) accelerating dynamic bug detection and failure diagnosis methods, and 4) developing automated bug-fixing techniques for issues detected by both Rust’s safety checks and dynamic bug detection tools.

People

Ziyi Zhang
Shuofei Zhu
Mengting He

Code Release

A static tool suite for statically detecting memory and concurrency bugs in Rust programs. 550 stars
A tool that automatically fixes Rust’s compilation errors due to violating ownership rules.
A dataset constructed to understand Rust’s programming challenges.
An IDE plugin that visualizes a Rust variable’s lifetime scope.
A dataset constructed to understand memory and concurrency issues in Rust programs. 97 stars

Publications

Understanding and Detecting Real-World Safety Issues in Rust [preprint]
Boqin QinS, Yilun Chen, Haopeng Liu, Hua Zhang, Qiaoyan Wen, Linhai Song, and Yiying Zhang
TSE'2024
Rust-lancet: Automated Ownership-Rule-Violation Fixing with Behavior Preservation [preprint]
Wenzhang Yang, Linhai Song, and Yinxing Xue
ICSE'2024
Beyond Bot Detection: Combating Fraudulent Online Survey Takers [preprint]
Ziyi ZhangS, Shuofei ZhuS, Jaron Mink, Aiping Xiong, Linhai Song, and Gang Wang
WWW'2022
Learning and Programming Challenges of Rust: A Mixed-Methods Study [preprint]
Shuofei Zhu*S, Ziyi Zhang*S, Boqin QinS, Aiping Xiong, and Linhai Song
ICSE'2022
* both are leading authors.
VRLifeTime: An IDE Tool to Avoid Concurrency and Memory Bugs in Rust [preprint]
Ziyi ZhangS, Boqin QinS, Yilun Chen, Linhai Song, and Yiying Zhang
Demo@CCS'2020
Understanding Memory and Thread Safety Practices and Issues in Real-World Rust Programs [preprint]
Boqin Qin*S, Yilun Chen*, Zeming YuS, Linhai Song, and Yiying Zhang
PLDI'2020
* both are leading authors.

Funding