Safer C++ with MISRA-C++ 2023
summary
MISRA C++:2023 gives concrete rules for C++17-era code: mandatory static-analysis checks, sanitizer use, and unit tests; it limits function calls in range-for to avoid temporary-lifetime dangling (workaround until C++23 fixes it); it prescribes signatures for copy/move and ref-qualifies accessors to stop dangling references; it recommends strong types and offers a safe integers approach after Monte Carlo showing integer multiplication often overflows (~7 nines); use the provided bitfield helper instead of native bitfields.
AI-written summary · about
chapters (17)
- 0:00Safer C++ with MISRA-C++
- 1:29Personal journey with MISRA-C++
- 4:41C++ code safety and vulnerabilities
- 11:47MISRA-C++ purpose and history
- 13:12MISRA-C++ 2023 and C++ standard
- 17:52MISRA rules and categories
- 22:12Safer C++ features
- 28:56C++ type system limits
- 32:30Integer overflow risks
- 37:56Strong types and conversions
- 43:20Casts as design errors
- 47:32Bit fields, unions and hardware
- 50:21Class design and encapsulation
- 52:07Ref-qualifying member functions
- 54:32Special member functions misuse
- 58:02Value types and dangling references
- 1:00:10MISRA-C++ future and advice
related talks
01h 20mSafer C++: MISRA-C++ : 202X Rules and Beyond
57mThe Misra C++:2023 Guidelines
58mMisra Parallelism Safety-critical Guidelines for C++11, 17, Then C++20, 23
53mFrom Chaos to Control: Overcoming C and C++’s Inherent Unsafety
01h 29mC++ Safety And Security Panel 2024
01h 13mPractical Tips for Safer C++
58mCorrect Use of Integers in Safety-critical Systems
01h 00mint != safe && int != ℤ
