Sound Automatic Lock Placement for Concurrent Programs with Pointers
Nicolas Waldburger, Florian Faissole, Ryo Okabe, Denis Cousineau
Key points
From the paper's conclusion- We propose a lightweight method for automatic lock placement in concurrent POSIX programs with explicit pointer manipulation, such as C programs.
Abstract
We propose a lightweight method for automatic lock placement in concurrent POSIX programs with explicit pointer manipulation, such as C programs. Given a program that lacks sufficient user-placed mutexes, or contains none at all, our method introduces new mutexes to prevent data races. The method is formally proven to guarantee the absence of data races and mainly consists of three steps. The first step performs lockset analysis and may-happen-in-parallel analysis. The second step conducts a concurrent points-to analysis derived from a Steensgaard-like procedural analysis, where per-thread points-to graphs are unified using a special completion rule. The final step places locks to prevent data races while respecting a lock ordering to avoid deadlocks. In addition, user-annotated critical sections are protected through insertion of dedicated locks. Since lock placement is a complex and error-prone task, our method aims at helping developers write correct concurrent programs.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Petri Nets-based Methods on Automatically Detecting for Concurrency Bugs in Rust ProgramsACM Transactions on Autonomous and Adaptive Systems · 2026
- When Separation Arithmetic is Enough, or How to Automate the Proof of Programs that Use PointersFormal Aspects of Computing · 2026
- Nothing Is Shared Until You Synchronise: Reinterpreting Java for Data-Race FreedomarXiv · 2026
- Breaking the Coupling: Efficient Concurrency Fuzzing for Linux Kernel Data Race DetectionarXiv · 2026
- Multi-stage On-Demand Program Slicing for Modular Analysis of Multi-threaded ProgramsProceedings of the ACM on Software Engineering · 2026
- XRust: Detecting Logical Races in Rust Linux DriversarXiv · 2026