~/talk

Removing Needless Undefined Behavior for a Safer C++

Talkat ACCU 2023 · 2023-04-19..04-22· [security, c-and-cpp]
links:none on file
slides:none on file

C++ has many specific undefined behaviors (UB) that can be classified and constrained rather than left unconstrained; examples include null-dereference/time-travel optimizations that once let GCC turn a null call into running rogue then removing files, preprocessor tokenization quirks that Microsoft later diagnosed, and uninitialized local reads that enable hijacks. Proposed fixes for C++26 include making some preprocessor cases ill-formed no diagnostic required, adding a contracts facility to check preconditions at runtime, experimenting with zero-initialize locals, and relying on tooling like UBSan/ASan/TSAN for detection.

AI-written summary · about

  1. 0:00Introduction
  2. 0:20Who am I
  3. 1:12Outline
  4. 2:00Why this talk
  5. 4:10Show Hands
  6. 4:20Popular Quotes
  7. 5:32Time Travel
  8. 8:10Program Definition
  9. 10:24Compile Time
  10. 11:18Compile Time Behavior
  11. 18:14Can we time travel
  12. 19:00Time travel example
  13. 19:30Simple example
  14. 22:45Testing the example
  15. 25:30Thesis
  16. 26:17Social Contract
  17. 27:49Possible fixes
  18. 29:25Examples
  19. 30:50Preprocessor
  20. 34:08Local Variables
  21. 37:13Welldefined Behavior
  22. 41:00Jake Fevold
  23. 44:58What is erroneous behavior
  24. 46:24A quick drink
  25. 46:46Preconditional callout
  26. 47:25Preconditional examples
  27. 49:43Why support this
  28. 50:58C26 Contracts
  29. 54:18Contract Violation
  30. 57:28Example
~/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.