EmbeddedRelated.com
Books
Jacob Beningo
Live online course · Jacob Beningo
AI for Embedded Developers
$100 off for EmbeddedRelated readers until Dec 6 · 5 live sessions, Dec 7-11
Discount ends in
28days 14hrs 12min 48sec
Learn More →

Safer C: Developing Software for High-Integrity and Safety-Critical Systems (The McGraw-Hill International Series in Sof

Hatton, Les ● 1995

This book is aimed at C developers in safety-related or high-integrity environments.


Why Read This Book

You will learn practical, testable techniques to avoid the most dangerous C language pitfalls that cause bugs in safety‑critical and high‑integrity systems. The book blends hands‑on examples, failure modes, and defensible coding advice so you can write, review, and test C firmware with greater confidence.

Who Will Benefit

Experienced C developers and firmware engineers working on safety‑related, resource‑constrained, or high‑integrity embedded systems who need to reduce runtime failures and improve code assurance.

Level: Intermediate — Prerequisites: Working knowledge of the C language (K&R/ANSI C), familiarity with compiling and linking, and basic software development practices — familiarity with embedded development and interrupts is helpful but not required.

Get This Book

Key Takeaways

  • Identify common C language defects and undefined behaviors that lead to safety-critical failures
  • Apply defensive coding patterns and simple transformations to make C code more robust and maintainable
  • Use static and dynamic checks to detect errors early and to construct practical test strategies for firmware
  • Design interfaces and data handling schemes that reduce risk from type, boundary, and resource errors
  • Adopt pragmatic coding rules and review checklists you can use immediately in high‑integrity projects

Topics Covered

  1. Introduction: Safety and High‑Integrity Software
  2. A Review of C and its Achilles' Heels
  3. Undefined and Implementation‑Defined Behavior: What Can Go Wrong
  4. Types, Conversions and Arithmetic Pitfalls
  5. Memory, Pointers and Aliasing Hazards
  6. Control Flow, Exceptions and Error Handling
  7. Library Use, I/O and the Runtime Environment
  8. Concurrency, Interrupts and Reentrancy (practical concerns)
  9. Testing, Debugging and Dynamic Checking
  10. Static Analysis, Reviews and Coding Standards
  11. Portability, Reliability Metrics and Configuration Management
  12. Practical Guidelines, Checklists and Case Studies
  13. Appendices: Examples, Test Cases and Reference Material

Languages, Platforms & Tools

CEmbedded systems (general)Safety‑critical/high‑integrity systemsGCC and other C compilerslint / PC‑Lint (static analysis)Static analysis tools (general)Runtime checkers / memory debuggers (e.g., Valgrind, Purify)Unit testing and test harnesses

How It Compares

Covers safety‑focused, defensive C programming in a way complementary to the CERT C Secure Coding Standard and Seacord's Secure Coding in C and C++, with a stronger emphasis on practical, high‑integrity engineering examples rather than modern language‑security threats.

Related Books

Bryant, Randal, O'Hallaron,...