Finding Bugs with Clang at Compile and Run Time
summary
Shows how clang tooling finds bugs at compile and run time: uses clang-tidy plus AST queries (clang-query/clang-check) to implement a custom checker that flags inherited overrides of non‑virtual methods, generates tests and fix‑its, builds against the compilation database and the checker works in the test suite. Demonstrates sanitizers (AddressSanitizer, UBSan, ThreadSanitizer, LeakSanitizer) to catch use‑after‑free, UB, races and leaks at runtime with modest overhead, and cites examples where automated tools found dozens of real defects.
AI-written summary · about
chapters (18)
- 0:00Start
- 8:45Analysis Techniques
- 12:03Dimensions of Static Analysis
- 13:43Precision of the Checker
- 14:43The Level of Static Analysis
- 16:36The Architecture Level
- 17:41Cyclic Dependencies
- 20:09Dynamic Analysis
- 23:07Infinite Recursive Loop
- 25:50Overview of Clang
- 30:08Problem of the Missing Semicolon
- 37:22Compilation Database
- 38:05Static Analyzer
- 40:09Static and Airless Static Analyzer
- 41:04Static Analysis Checkers
- 59:04Sanitizers
- 59:52Refactoring
- 1:01:35Delete Implicit Generated Method
related talks
14mTool Talk: CodeChecker
18mDon't Look UB: Exposing Sanitizer-Eliding Compiler Optimizations
59mBeyond Sanitizers...
01h 03mPurging Undefined Behavior & Intel Assumptions in a Legacy C++ Codebase
01h 02mSanitize your C++ code
36mThings I learned from the static analyzer
34mBetween Building and Testing Your Linux Driver
29m“The Current State of (free) Static Analysis"
