~/talk

UB effects on real world projects

Talkat Core C++ 2023 · 2023-06-05..06-07· [security, c-and-cpp]
links:none on file
slides:none on file

Shows concrete failures where compilers exploit UB to remove safety checks: Linux kernel left-shift UB removes zero check, strcpy calls lose null checks after optimization, and a double-unlock turns into an illegal x86 instruction tied to TSX errata. Porting exposes alignment differences that truncate copied bytes between Windows and Linux. Recommends running ubsan and the ISS-based interpreter and using compiler flags or bisecting compiler versions because optimizations based on UB routinely reorder or drop code and can break long-stable systems.

AI-written summary · about

  1. 0:00Introduction to undefined behavior
  2. 1:48Culture and values behind UB
  3. 4:39Real-world UB bugs examples
  4. 9:40Runtime limitations with UB
  5. 13:41Tooling and UB detection limits
  6. 15:28Surprising UB in constructors
  7. 18:33Strict aliasing violations
  8. 21:01Less known UB cases
  9. 23:08Mitigations and solutions
  10. 24:56Performance vs UB trade-offs
  11. 25:17Key takeaways and conclusion
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.