~/talk

Race Conditions - Practical Tools & Techniques for Testing, Preventing, and Debugging C++/C Code

Talkat ACCU 2025 · 2025-04-01..04-04· [security, c-and-cpp]
name:Greg Law
linkedin:gregthelaw
slides:none on file

Shows concrete tools and tradeoffs: ThreadSanitizer (clang/gcc) finds many data races fast (compiler instrumentation, ~2x slowdown) but misses ordering races; Helgrind/DRD via Valgrind (binary-level, 100–200x slowdown) works without recompiling and catches different bugs; demonstrating GDB’s thread view and scheduler locking clarifies stepping behavior; and time‑travel recording + reverse‑continue lets you load a single failing run and follow which thread wrote a value. Also warns that adding a mutex can hide races from detectors and that fuzzing plus sanitizers finds more.

AI-written summary · about

  1. 0:00Race conditions in C++/C
  2. 1:53Race conditions and challenges
  3. 3:18Debugging tools for races
  4. 4:03ThreadSanitizer demo
  5. 5:50ThreadSanitizer output limits
  6. 7:15How ThreadSanitizer detects races
  7. 8:40Configuring ThreadSanitizer
  8. 10:07Valgrind and Hellgrind
  9. 11:31Hellgrind vs ThreadSanitizer
  10. 12:38Sanitizers vs Valgrind
  11. 14:45Q&A on sanitizers
  12. 16:51Fixing races with mutexes
  13. 17:55Common race conditions
  14. 20:03Flaky failures and races
  15. 20:44Debugging with GDB
  16. 22:51GDB thread handling
  17. 26:45GDB misconceptions and LLDB
  18. 27:31Time Travel Debugging
  19. 29:21Time Travel Debugging demo
  20. 30:45Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.