~/talk

Dangerous Optimizations in C and C++ Programming Languages

Talkat ACCU 2025 · 2025-04-01..04-04· [c-and-cpp, security]
slides:none on file

Compilers increasingly treat undefined behavior (UB) as a license for aggressive optimization, claiming wins from constant folding, loop‑invariant hoisting and induction‑variable rewrites but sometimes removing bounds checks or turning a finite loop into an infinite one. Concrete examples include the pointer+len overflow optimization that eliminates a bounds test at -O2 and GCC’s shifting diagnostics/flags (strict‑overflow deprecated in GCC 8). Practical mitigations shown are sanitizers (UBSan/ASan), auditing generated assembly, and a forthcoming TS6010 pointer provenance specification. Slides and code links are on the ACCU site.

AI-written summary · about

~/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.