Catching Real-time Safety Violations in C++
summary
Describes a practical stack for finding real‑time safety violations: use kernel tracers (mac System Trace, dtrace, strace/ltrace) to catch syscalls and futex waits but expect noisy output; use LD_PRELOAD interposing or a shared‑library shim to intercept malloc/free and pthread_mutex calls (works and finds allocations and locks, but yields false positives for uncontended lock fast‑paths and misses inline syscalls); add an operator new/delete override with thread‑local realtime scopes for app‑level checks; try RTSan (clang fork) for attribute‑based detection and future no_alloc/no_lock static checks.
AI-written summary · about
chapters (13)
- 0:00Introduction and concepts
- 2:18Defining real-time safety
- 5:20Detecting violations
- 8:54Using GUI tools
- 11:51Atomic and lock challenges
- 14:54Command line tracing tools
- 17:22Deep dive with Dtrace
- 21:13Code-level instrumentation
- 25:12Progressive real-time testing
- 32:40Mutex contention and safety
- 35:14Function interposing
- 41:33RTSan implementation
- 45:03Future of real-time analysis
related talks
01h 01mReal-time Safety — Guaranteed by the Compiler!
31mRace Conditions - Practical Tools & Techniques for Testing, Preventing, and Debugging C++/C Code
44mDebugging memory corruptions in C++
01h 00mStatic Analysis and Program Safety in C++: Making it Real
48mSecure C++ Programming
01h 26mA Path to Practically Safe C++
51mAutomation Techniques in C++ Reverse Engineering
01h 12mFinding Bugs with Clang at Compile and Run Time
