~/talk

Dangerous Optimizations! in C++ - Part Deux

Talkat ACCU on Sea 2026 · 2026-06-17..06-20· [c-and-cpp, security]
slides:none on file

Shows concrete compiler behaviors that break causality: a loop-invariant remainder hoisting undefined behavior on MSVC moves a division fault earlier, GCC O0 vs O2 reproduces the shifted crash, and integer promotions lead to integer promotion overflow that lets the optimizer remove a negative-branch. Demonstrates a Linux kernel exploit where null-deref plus mmap(0) executes attacker code and explains the fix (move the dereference or build with fno-delete-null-pointer-checks). Slides and examples live on the provided GitHub.

AI-written summary · about

  1. 0:00Introduction
  2. 1:24Dangerous optimizations premise
  3. 3:08Time travel UB in compilers
  4. 12:23C committee on UB
  5. 23:45UB types defined
  6. 26:14Compiler UB optimizations
  7. 31:55Integer overflow pitfalls
  8. 43:02Strict aliasing impact
  9. 52:07Effective type violations
  10. 1:01:47Null pointer risks
  11. 1:13:17Linux kernel exploit
  12. 1:22:39Best practices
~/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.