~/talk

Undefined Behaviour is awesome!

Talkat CppCon 2017 · 2017-09-24..09-29· [compilers-and-language-design]

Covers concrete examples where undefined behavior lets the optimizer rewrite or remove code: integer overflow enables assuming x+1>x, a null dereference leads the compiler to delete whole paths and accidentally drop checks, missing return can make code fall into other functions and crash, and realloc/move create use-after-lifetime surprises. Demonstrates runtime and compile-time defenses like UBSan, AddressSanitizer, MemorySanitizer, valgrind, fwrapv/ftrapv and link-time options such as ThinLTO, and shows which fixes catch which bugs.

AI-written summary · about

  1. 0:00Intro
  2. 0:12OUTLINE
  3. 0:36UNDEFINED BEHAVIOR UBI
  4. 6:09CALLING MAIN
  5. 7:18SIMPLE OVERFLOW
  6. 8:31CHECKING FOR OVERFLOW
  7. 9:12INTEGER OVERFLOWS + LOOPS
  8. 11:17INTEGER OVERFLOWS - MITIGATION
  9. 13:20UNINITIALIZED VALUES - MITIGATION
  10. 14:43REASONS FOR HAVING UNDEFINED BEHAVIOR
  11. 27:43DEREFERENCING NULL - MITIGATION
  12. 29:18FORGETTING RETURN STATEMENT
  13. 35:48BUFFER OVERFLOW - MITIGATION
  14. 36:36LET'S TALK ABOUT CONST
  15. 40:49THE SOLUTION
  16. 41:54LIFETIME AND POINTERS
  17. 46:43VIRTUAL FUNCTIONS - MITIGATION
  18. 47:54MISBEHAVING BEHAVIOR
  19. 49:51WRAPPING UP
~/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.