Safe C++ Research

  • Last Updated 11 August, 2026
  • by David Spuler, Ph.D.

Safe C++: Book Excerpts and Blog Articles

Free online book excerpts with full text chapters online and free PDF downloads, and the Aussie AI blog, including related articles:

  • Use-After-Free errors are a security attack vector in software based on maliciously changing memory that has already been deallocated. Freed memory in software should not be accessible thereafter, but bugs in software mean that pointers to that memory may still exist. The method of attack is to find a freed block of memory, that is currently unused by the process, and then wait for the process to re-use that memory for some other purpose. Once this occurs ... more about Use-After-Free errors »
  • Memory tagging is a technique for detecting invalid memory accesses that is used in runtime memory checkers, such as for C++ memory problems. Typically, memory tagging is hardware-supported to make it viable in running an application to detect errors.... more about Memory tagging »
  • Memory safety is a programming technique of avoiding serious problems with pointers and memory addresses. Notably, C++ has a reputation of having problems with memory safety, whereas some other languages have fewer concerns. Using modern C++ standards has greatly reduced the problem, by removing the need to use pointers in many coding areas, but it is still not perfect. Various techniques exist to prevent, detect, and correct memory safety errors in programs. ... more about Memory safety »
  • Floating point numbers are typically stored in 32-bits for single-precision (e.g. C++ "float" types), and it's actually a 32-bit integer behind the scenes. The main floating point types are ... more about Floating point numbers »
  • David Spuler, 7th March, 2025, 100 C++ Memory Safety Techniques, Aussie AI Blog, https://www.aussieai.com/blog/cpp-memory-safety
  • David Spuler, Ph.D., November 2nd, 2024, Aussie AI Blog, DIY Preventive C++ Memory Safety, https://www.aussieai.com/blog/preventive-memory-safety
  • David Spuler, March 2024, Chapter 40. Reliability, in book "Generative AI in C++", https://www.aussieai.com/book/ch40-reliability

Safe C++

Rust vs C++

Memory Safety

Undefined Behavior

Undefined behavior is any types of operations where the results are not fully described by the C++ standard. Examples include uninitialized variables, null pointer dereferences, arithmetic overflows, and all sorts of other obscure malfeasance. The aim of Safe C++ is to either prevent or normalize all undefined behavior.

Papers and articles on undefined behavior in C++:

Memory Tagging

Memory tagging, also called pointer tagging, is a method of tagging addresses and pointer variables with extra information in relation to their status and safety.

Runtime Memory Checker Tools

Runtime memory checkers include tools like Valgrind or AddressSanitizer. There is a lot of research theory:

Floating-Point Runtime Error Checkers

Research papers on tools that detect floating-point errors and exceptions at runtime:

Secure C++

Use-After-Free Errors

Research papers on use-after-free vulnerabilities:

Bounds Checking

Research papers on bounds checking:

Refactoring

Research papers on refactoring:

Safe C++ Blog Articles

See also these articles:

Safe C++ Book



Safe C++: Fixing Memory Safety Issues The new Safe C++ coding book by David Spuler:
  • Memory Safety
  • Rust versus C++
  • The Safe C++ Standard
  • Pragmatic Memory Safety

Get your copy from Amazon: Safe C++: Fixing Memory Safety Issues

More AI Research

Read more about: