Following up on the recent LLVM Memory Safety WG meeting, we’re setting up a new breakout group focused on Lifetime Safety in Clang.
There’s growing interest in this area, and we think a dedicated forum will help coordinate ongoing work, discuss the roadmap, and involve more contributors.
Lifetime Analysis: Current Status
For those not already familiar, we’re working on a new intra-procedural lifetime analysis in Clang to catch issues like use-after-scope or returning-stack-address. The analysis is alias-based and draws inspiration from Rust’s borrow checker (specifically, Polonius). More details in the RFC.
The initial implementation targets an intra-procedural analysis for C++ raw pointers. This keeps the surface area small while we iterate. Over time, we aim to enable this analysis by default in Clang, with both “permissive” and “strict” modes to balance noise and coverage.
Goals of the Breakout Group
This breakout group will be a space to:
Coordinate between current contributors (from Google and Apple) and others interested in getting involved.
Discuss design, milestones, and direction for the analysis.
Invite contributions, including implementation help, code reviews, and early feedback from users who are willing to try the analysis and report issues.
Last time, we decided on a 2w cadence for this meeting. We meet again tomorrow same time (2:30PM - 3:30PM CEST). Meetings are added to the LLVM public calendar as well.
Please add things to the agenda if you would like to discuss things.