Week 1, 2021: Bug-out Bag Essentials
🔗 Pre-Discussion Learning Material
-
A Guide to Undefined Behavior in C and C++, Part 1
- read this first, it gives a good definition for undefined behavior (which the talk lacks)
- focus on reading up to the “Type 1 Functions” section (although the subsequent sections are worth a skim)
- CppCon 2017: Piotr Padlewski “Undefined Behaviour is awesome!”
🔗 Warmup
🔗 Topics
- C++ & Undefined behavior
- Empirical debugging tools
- Charles Ofria
- Using gdb
- Matthew
- compile with
-g
flag - info locals (print info about local variables)
- bt (backtrace)
- b (set a breakpoint)
- list (print source code around current location)
-
__LINE__
and__FILE__
- Using valgrind
- Santiago
- Memory leak
- Double free
- Out-of-bounds write in heap
- clang’s sanitizers