What C++ Needs to be Safe
summary
Proposes making C++ safe by adding concrete tools: Contracts MVP in C++26 with runtime and symbolic assertions that catch ~65% of common errors (bounds checks), an erroneous‑behavior regime that prevents uninitialized‑read and signed‑overflow exploits, and ghost data (research toward C++32) to enforce exclusivity at runtime; Bloomberg prototypes features in Clang/GCC, already landed trivial relocation in the standard, and reports long‑term production use and iterative prototyping rather than one‑off edits.
AI-written summary · about
chapters (21)
- 0:00C++ safety initiative intro
- 1:12Motivation for safer C++
- 3:03Three pillars of C++ improvement
- 8:01History of C++ contracts
- 16:10Defining memory safety
- 20:01Correctness vs security
- 22:26Runtime contracts in C++26
- 28:25Future C++ safety features
- 31:39Erroneous behavior hardening
- 35:14Symbolic contract assertions
- 38:29Safety profiles and subsets
- 40:56Compile-time exclusivity
- 43:48Runtime exclusivity with ghost data
- 50:57Max safety techniques
- 51:42Compiler and ecosystem health
- 53:30Allocator improvements
- 55:20Trivial relocation in practice
- 59:36Summary and roadmap
- 1:07:16Future plans and community
- 1:12:34Q&A on ghost data
- 1:22:46Constification and contract safety
related talks
01h 05m“Contract Programming in C++(20) (part 2 of 2)”
56mContracts for Dependable C++
57mPerspectives on Contracts for C++
01h 03m“Contract Programming in C++(20) (part 1 of 2)”
57mSane and Safe C++ Class Types
01h 37mC++ And Beyond: Discussion
01h 17mFunction Contracts in Practice using C++
01h 32mMistakes to Avoid When Writing C++ Projects
