~/talk

Curiously Recurring C++ Bugs at Facebook

Talkat CppCon 2017 · 2017-09-24..09-29· [concurrency]
linkedin:lbrandy
slides:none on file

Facebook C++ history shows concrete failure modes: using map's square‑bracket inserts missing keys and silently returns zero; folly's findWithDefault variants led to dangling references to temporaries and AddressSanitizer with fsanitize=address finds dozens of such bugs; shared_ptr separates object and shared_ptr control block (refcount) so unsynchronized reads/writes of the pointer corrupt state; unnamed RAII guards that shadow mutex members compile and leave mutexes unlocked (detectable with Wshadow or a clang‑tidy check). Tools and library changes, not platitudes, stop these bugs.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:12Why these bugs matter
  3. 3:34Audience perspectives on bugs
  4. 4:35Square bracket operator pitfalls
  5. 7:07Map operator square bracket trap
  6. 12:22Mitigating map operator issues
  7. 17:20The volatile keyword debate
  8. 20:09Is shared_ptr thread-safe?
  9. 28:34Shared_ptr lifetime bugs
  10. 29:17RAII lock guard shadowing
  11. 39:39Mitigating RAII shadowing
  12. 42:08Tools and teaching for prevention
  13. 44:24Address Sanitizer impact
  14. 45:08Q&A on excluded bugs
~/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.