Real-time Safety — Guaranteed by the Compiler!
summary
Shows how Clang 20 Function Effect Analysis plus RealtimeSanitizer let the compiler enforce realtime constraints: mark functions non-blocking (or non-allocating) and get compile-time errors if they call malloc, take locks, or throw. Describes a real refactor at Squarehead moving a soft‑realtime DSP pipeline toward harder realtime, the need to write a custom non‑blocking type‑erased function to avoid std::function heap use, and how to handle unannotated third‑party libs with scoped ignores plus runtime sanitizer checks; the approach works in practice.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:34Real-time code challenges
- 8:56Clang 20 compiler tools
- 13:11Performance constraints
- 21:42Transitive checks and inheritance
- 29:14Third-party code and sanitizers
- 33:52Lambdas and callbacks challenges
- 42:02Type erasure and non-blocking functions
- 54:32Conditional non-blocking with templates
- 56:42Retrofitting real-time safety tips
- 1:00:13Q&A
related talks
30mCompiler Sanitizers for Fun and Profit
54mKeynote: Safety in C++: All the Safeties!
01h 11mThree Cool Things in C++26: Safety, Reflection & std::execution
57mC++ MythBusters Strike 2
18mExciting new compiler flags for kernel security
31mRace Conditions - Practical Tools & Techniques for Testing, Preventing, and Debugging C++/C Code
16mReconciling Optimization With Secure Compilation
01h 08mImplementing the C++ Core Guidelines’ Lifetime Safety Profile in Clang
