~/talk

Undefined Behavior is Not an Error

Talkat CppCon 2018 · 2018-09-23..09-28· [c-and-cpp]
links:none on file
links:none on file
slides:none on file

Core claim: undefined behavior is not an error — the compiler may legally treat UB as “code not present,” leading to surprising results. Real examples: a missing return jumps into the next function, an out‑of‑bounds operator[] lets an optimizer remove loop bodies (output becomes empty), and signed integer overflow lets clang replace a loop with a multiply/divide. Fixes: rewrite code or use safer patterns (version 3 used compile‑time counter, constexpr and recursive templates and avoids UB). Tools: sanitizers, Coverity, clang static analyzer, valgrind, godbolt and multiple compilers/flags.

AI-written summary · about

  1. 0:00Start
  2. 2:15Why Are We Giving this Talk
  3. 6:21Defined Behavior
  4. 10:13What Is Undefined Behavior
  5. 12:55Why Are We Studying Undefined Behavior
  6. 15:23Compile Time Counter
  7. 28:59Audience-Participation
  8. 35:48Quiz Time
  9. 37:01Order of Evaluation of Operands
  10. 41:07Undocumented Behavior
  11. 45:19To Treat Undefined Behavior as a Critical Bug
  12. 45:49Static Analysis Tools
  13. 48:47Recap
~/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.