From Chaos to Control: Overcoming C and C++’s Inherent Unsafety
summary
C and C++ are described as inherently unsafe: buffer overflows, lifetime and bounds errors, undefined behavior like division by zero that “can do anything,” and unspecified call order. Migration to Rust is impractical given existing codebases and ecosystem constraints. Industry guidance recommends rule sets: MISRA C++ (2023) with 179 rules and MISRA C (2025) with 223 rules, ~80% of rules are decidable by static analysis. Tools such as clang-tidy and Sonar run MISRA checks in CI, while some issues (floating point tolerances, semantic intent) remain undecidable and require human design and documentation.
AI-written summary · about
chapters (10)
- 0:00C and C++ unsafety intro
- 2:36Why C and C++ are unsafe
- 4:04Memory safety vulnerabilities
- 7:17Undefined behavior explained
- 13:22Migrating from C and C++
- 17:16Safer coding standards
- 22:13Enforcing safety with MISRA
- 33:48MISRA guidelines and contradictions
- 37:44Mitigating risks with guidelines
- 38:51Closing remarks & Q&A
related talks
45mThe existential threat against C++ and where to go from here
01h 20mSafer C++: MISRA-C++ : 202X Rules and Beyond
01h 01mMemory Safety: Rust vs. C
01h 05mSafer C++ with MISRA-C++ 2023
57mThe Misra C++:2023 Guidelines
01h 26mVulnerable C++
14mEmbedded C and C++: A Security Perspective
01h 01mClosing the Gap between Rust and C++ Using Principles of Static Analysis
