Closing the Gap between Rust and C++ Using Principles of Static Analysis
summary
Compares Rust guarantees to concrete C++ checks implemented and demoed: live MSVC code analysis rules for casting, exhaustive switch/match, converting C-style loops to range for, detecting expensive copies and suggesting const auto&, and lifetime checks that flag dangling iterators. Shows a real bug found in millions of lines that becomes remote code execution but is downgraded to denial of service by switching to gsl::span and gsl_copy. Describes AST modernization, plugin plans and a preview where green-squiggle diagnostics and some fix-its already work.
AI-written summary · about
chapters (22)
- 0:00Introduction and overview
- 1:54What is static analysis
- 4:03Why explore Rust and C++
- 6:28First Rust learning and challenges
- 8:54Safety buckets comparison
- 11:44Casting and switch rules
- 13:10Demo: Switch statement checks
- 14:59Smarter loops in Rust
- 16:42Demo: Loop safety checks
- 18:52Smarter copying in Rust
- 20:57Demo: Expensive copy detection
- 23:01Const auto and references
- 24:48Demo: Const reference checks
- 26:13Lifetimes and invalid iterators
- 27:37Demo: Dangling iterator check
- 29:03Mutability in Rust
- 31:28Summary of safety improvements
- 32:53Production code bug examples
- 38:03Current tooling and integration
- 40:30Future plans for C++ analysis
- 43:41Community and feedback
- 46:47Q&A session
related talks
43mEverything I learned about static analysis and program safety in C++
01h 00mStatic Analysis and Program Safety in C++: Making it Real
53mFrom Chaos to Control: Overcoming C and C++’s Inherent Unsafety
54mType-and-resource Safety in Modern C++
36mCode Analysis: Empowering developers to write performant, reliable, and safe C++
19mCounterexamples in Safe Rust
45mBuilding Safe and Secure Systems in Rust
29m“The Current State of (free) Static Analysis"
