

Realtime Sanitizer and the Performance Constraints attributes
Oct 29, 2024
Christopher Apple, a software engineer with a focus on real-time safety and performance in C++, chats about the Realtime Sanitizer introduced in Clang 20. He discusses its role in enhancing code safety, especially in audio applications, and the challenges of memory management. The conversation touches on how the Performance Constraints attributes help in non-blocking function reliability. Additionally, they cover the implications for real-time programming and why these advancements matter in industries like gaming and fintech.
AI Snips
Chapters
Transcript
Episode notes
Immersive Audio at Tokyo Nightclubs
- Christopher Apple installed a unique immersive Dolby Atmos speaker system in Tokyo nightclubs for surround DJ audio effects.
- This was a rare implementation of spatial audio in live DJ settings, greatly enhancing the listener experience.
Essence of Real-Time Programming
- Real-time programming requires returning the correct result within strict time deadlines to avoid failures.
- Non-deterministic operations like malloc, locking, or syscalls can unpredictably delay execution, breaking real-time constraints.
Using Real-Time Sanitizer
- Mark real-time constraint functions with [[clang::non_blocking]] and compile with -fsanitize=realtime to detect unsafe calls.
- If an allocation happens in these functions, the sanitizer prints a stack trace and aborts, helping catch real-time violations.