chapter one

1 Real-time and safety-critical software

 

This chapter covers

  • The unique challenges of software that must be both correct and timely
  • Why C++ dominates safety-critical development
  • Why memory safety should matter to all C++ developers
  • The C++ safety paradox
  • Building memory-safe C++ and the tools you'll need

On 19 July 2024, a content update to CrowdStrike's Falcon sensor crashed approximately 8.5 million Windows devices worldwide, which Microsoft put at less than one percent of all Windows machines (Microsoft, "Helping our customers through the CrowdStrike outage," 2024: https://blogs.microsoft.com/blog/2024/07/20/helping-our-customers-through-the-crowdstrike-outage/). Hospitals cancelled surgeries. Airlines grounded flights. Emergency services lost their dispatch systems. CrowdStrike's root cause analysis named the mechanism precisely: an interprocess communication (IPC) template type declared 21 input parameter fields. The integration code supplied 20. With no runtime bounds check, the content interpreter reached for a 21st entry that was never there, and the system crashed (CrowdStrike, "External Technical Root Cause Analysis: Channel File 291," 2024: https://www.crowdstrike.com/wp-content/uploads/2024/08/Channel-File-291-Incident-Root-Cause-Analysis-08.06.2024.pdf).

1.1 Defining safety-critical software

1.2 Defining real-time safety-critical software

1.3 Different industries, same challenge

1.4 The case for C++

1.4.1 Performance without overhead

1.4.2 Deterministic execution

1.4.3 Industry maturity

1.5 Memory safety challenges

1.6 The C++ safety paradox

1.7 C++ memory safety triad

1.8 The complete learning cycle (CLC)

1.9 Tools and environment

1.10 Summary