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:

    Language was not powerful enough to describe the infant phenomenon. “I’ll tell you what, sir,” he said; “the talent of this child is not to be imagined. She must be seen, sir—seen—to be ever so faintly appreciated.”... The infant phenomenon, though of short stature, had a comparatively aged countenance, and had moreover been precisely the same age—not perhaps to the full extent of the memory of the oldest inhabitant, but certainly for five good years.
    Charles Dickens (1812–1870)

    A lover is never a completely self-reliant person viewing the world through his own eyes, but a hostage to a certain delusion. He becomes a perjurer, all his thoughts and emotions being directed with reference, not to an accurate and just appraisal of the real world but rather to the safety and exaltation of his loved one, and the madness with which he pursues her, transmogrifying his attention, blinds him like a victim.
    Alexander Theroux (b. 1940)