~/talk

Practical Tips for Safer C++

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [security]
slides:none on file

Shows concrete defenses: use -ftrapv / -fwrapv or -fsanitize=signed-integer-overflow,unsigned-integer-overflow to catch/define integer UB (trap in debug, wrap in release), or use libraries like SafeInt, Boost.SafeNumerics or flux for checked math; prefer std::strong_order for NaNs; use .at or a generic bounds-checked helper (span::at lands in C++26) or iterator-free algorithms to avoid OOB; follow the law of exclusivity to avoid dangling references; use constexpr + static_assert and sanitizers; note 29% never write unit tests.

AI-written summary · about

  1. 0:00Introduction to safety
  2. 2:39Understanding undefined behavior
  3. 8:03Numeric safety
  4. 28:26Bounds safety
  5. 41:21Memory safety
  6. 59:42Testing for safety
~/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.