Tree Borrows
summary
Replaces Stacked Borrows’ stack with a per-allocation tree and formalizes aliasing rules so compilers can assume those violations are UB while accepting many real-world patterns. Evaluated on the 30,000 most popular crates, it rejects 54% fewer test cases than Stacked Borrows (≈6k → ≈3k violations), is implemented in Miri, formalized and proved for key optimizations (including read‑read reorderings) in Rocq, and ships as an artifact for reproducible testing.
AI-written summary · about
chapters (10)
- 0:00Tree Borrows intro
- 1:27Rust optimizations and aliasing
- 3:57Aliasing violations UB
- 4:57Stack Borrows limits
- 8:03Tree Borrows model
- 10:09Trees vs stacks
- 12:16Detecting UB with Tree Borrows
- 13:19Permissiveness evaluation
- 14:26Real-world impact
- 15:31Q&A
related talks
40mAgainst Borrowing: Own the forest, not the trees!
33mRewrite, Optimize, Repeat
05mEmulating Rust's Borrow Checker in C++
28mDetecting Borrow and Provenance Bugs Across Unsafe Rust [...]
19mPure Borrow: Linear Haskell Meets Rust-Style Borrowing
53mThe Rust Borrow Checker - A Deep Dive
36mThe Rust Borrow Checker: A Deep Dive
22mThe Rust Borrow Checker - A Deep Dive
