Build Safer Modern C++ Application: Mix Assertion, Logging, Unit Testing and Fuzzing with ZeroErr
Talkat CppCon 2024 · on Thursday, 2024-09-19· at 09:00· Cottonwood 2/3, 6700 North Gaylord Rockies Boulevard·
summary
ZeroErr is a header-only C++11 library that actually combines assertion, logging, unit testing and structure-aware fuzzing into one framework. Assertions log failures (and can throw) so tests can verify which path ran; logging stores structured fields in memory for in-test inspection; a pretty-printer uses overload-ranks and partial specialization to resolve rule priority for compositional types; fuzzing uses domains and seeds and runs with Clang + libFuzzer (examples run 100 iterations). The implementation is practical and extensible and the examples demonstrate the features working end to end.
AI-written summary · about
chapters (23)
- 0:00Welcome to ZeroErr
- 1:04ZeroErr framework concept
- 2:06Debugging struggles inspiration
- 7:46Unit tests missed critical bug
- 10:20Logging benefits over error codes
- 13:11Fuzzing needs structured input
- 14:38ZeroErr features and design
- 16:32Assertion examples in ZeroErr
- 18:23Logging API and structured logs
- 19:50Reading logs in memory
- 21:16Fuzzing API and integration
- 26:44Pretty printer details
- 35:04Assertion behavior comparison
- 37:34Structured logging benefits
- 40:08Log storage and iteration
- 42:18Fuzzing domains explained
- 44:30ZeroErr roadmap
- 45:55Q&A
- 46:16Assertions debug vs release
- 47:25Testing move constructors
- 50:41Log-based testing maintainability
- 52:05Assertion expression expansion
- 53:55Closing remarks
related talks
41mFuzzing Class Interfaces for Generating and Running Tests with libFuzzer
24mWhy you should be using automated fuzzing to test for security issues in your code
31m“Fuzz or lose..."
52mStructure aware fuzzing
01h 15mMake your programs more reliable with Fuzzing
23mContinuous Fuzzing Best Practices
53mFuzzing 101
25mHow fuzzing helps to find bugs
