~/talk

Secure Coding in C and C++ - Volatility Ahead

Talkat NDC TechTown 2021 · 2021-08-30..09-02· [security, c-and-cpp]
slides:none on file

Explains that volatile applies to lvalue accesses, not inherently to objects, so C23 changes standard wording to say "access through a volatile-qualified lvalue". Shows concrete failures: setjmp/longjmp optimization bug and a Chromium CVE (CVE-1234) where shared-memory races caused a buffer overflow fixed by copying size to the stack. Details: volatile prevents caching but does not provide atomicity, ordering, or prevent tearing; compound and ambiguous assignments are deprecated ambiguous volatile assignments (C++20) and should be avoided.

AI-written summary · about

  1. 0:00Introduction
  2. 1:36Agenda
  3. 2:02Use Case
  4. 3:05Volatile Qualification
  5. 3:59Volatile
  6. 5:41Static Volatile
  7. 7:29Const Volatile
  8. 8:48Uses of Volatile
  9. 14:02Volatile Objects
  10. 17:02Data Race
  11. 20:19Use Cases
  12. 21:53Implementation Defined Behavior
  13. 25:39Compound Assignments
  14. 27:45PrePost Increment and Decrement
  15. 28:46Chromium Example
  16. 29:45Command Decoder Example
  17. 33:25Volatile Atomic
  18. 35:21Example
  19. 38:22LValues
  20. 41:32Data is volatile
  21. 42:06C23 language
  22. 43:37Summary
  23. 45:46References
~/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.