~/talk

Undefined Behavior in C++: What Every Programmer Should Know and Fear

Talkat CppCon 2023 · on Thursday, 2023-10-05· at 09:00· Adams, 6700 North Gaylord Rockies Boulevard· [security]
slides:none on file

Concrete claims and reproducible demos: compilers optimize away checks because they assume no UB, so signed integer overflow turns into constant true and loop-merging depends on undefined termination, causing behavior changes across versions (GCC 9 → 10). Live examples show null-dereference checks removed and crashes appearing far from the offending line. Detection uses runtime sanitizer UBSan, which only reports exercised UB. Advice centers on defining valid input domains, adding optional validators, or isolating critical code (even in assembly) when relying on specific semantics.

AI-written summary · about

  1. 0:00Introduction
  2. 0:26What undefined behavior is
  3. 3:17Undefined behavior taints program
  4. 9:00Compiler optimizations and UB
  5. 13:23Why UB persists in C++
  6. 16:54How compilers exploit UB
  7. 21:10Undefined behavior travels back
  8. 24:28Valid inputs to avoid UB
  9. 27:00Undefined behavior sanitizers
  10. 28:49Practical consequences of UB
  11. 30:42Q&A
~/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.