~/talk

Detecting Programs That Rely on Undefined Behavior

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp, testing]
links:none on file
slides:none on file

Undefined behavior can cause observable wrong output: a small snippet dereferencing past a std::array index prints garbage yet compilers give no warning; clang-tidy flags it and ASAN and UBSAN catch it at runtime (together they both fail fast). Another case: calling mktime on an uninitialized struct tm crosses a C library boundary and produces wrong results about half the time; clang-tidy points to Core Guidelines and Valgrind reliably finds the uninitialized memory. Use static checks plus dynamic sanitizers at different optimization levels.

AI-written summary · about

  1. 0:00Intro
  2. 0:22Undefined Behavior
  3. 1:09First Example
  4. 2:12Tools
  5. 2:47Toy Problem
  6. 3:57Clanked ID
  7. 4:43Conclusions
~/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.