Memory Safety

Memory safety is a concern in software development that aims to avoid software bugs that cause security vulnerabilities dealing with random-access memory (RAM) access, such as buffer overflows and dangling pointers.

Computer languages such as C and C++ that support arbitrary pointer arithmetic, casting, and deallocation are typically not memory safe. There are several different approaches to find errors in such languages: see the Detection section below.

The Cyclone language uses a hybrid approach, including "fat pointers" (pointers that carry their metadata directly) and regions to give programmers some low-level control while still ensuring memory safety.

Most high-level programming languages avoid the problem by disallowing pointer arithmetic and casting entirely, and by enforcing tracing garbage collection as the sole memory management scheme.

A language could support even more uses of pointer arithmetic, casting, and deallocation without sacrificing memory safety by using automated theorem proving as a form of static code analysis. ESC/Java and D demonstrate two ways that programmers can declare their invariants in ways that can be understood by a theorem prover.

Read more about Memory Safety:  Types of Memory Errors, Detection

Famous quotes containing the words memory and/or safety:

    We went to Mannheim and attended a shivaree—otherwise an opera—the one called “Lohengrin.” The banging and slamming and booming and crashing were something beyond belief. The racking and pitiless pain of it remains stored up in my memory alongside the memory of the time that I had my teeth fixed.
    Mark Twain [Samuel Langhorne Clemens] (1835–1910)

    Can we not teach children, even as we protect them from victimization, that for them to become victimizers constitutes the greatest peril of all, specifically the sacrifice—physical or psychological—of the well-being of other people? And that destroying the life or safety of other people, through teasing, bullying, hitting or otherwise, “putting them down,” is as destructive to themselves as to their victims.
    Lewis P. Lipsitt (20th century)