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 SafetyTypes of Memory Errors, Detection

Other articles related to "safety, memory safety, memory":

Type Safety
... In computer science, type safety is the extent to which a programming language discourages or prevents type errors ... Type safety is sometimes alternatively considered to be a property of a computer program rather than the language in which that program is written that is, some languages ... The formal type-theoretic definition of type safety is considerably stronger than what is understood by most programmers ...
Memory Safety - Detection
... There are many different ways to detect memory errors in programs written in unsafe languages By using special heap allocators that provide dead zones around heap allocated storage, and check that accesses ... this by allocating objects in their own virtual memory page ... By running the compiled program in a memory-checking virtual machine ...
Type Soundness
... In computer science, type safety is the extent to which a programming language discourages or prevents type errors ... Type safety is sometimes alternatively considered to be a property of a computer program rather than the language in which that program is written that is, some languages have type-safe facilities ... The formal type-theoretic definition of type safety is considerably stronger than what is understood by most programmers ...

Famous quotes containing the words safety and/or memory:

    The safety of the republic being the supreme law, and Texas having offered us the key to the safety of our country from all foreign intrigues and diplomacy, I say accept the key ... and bolt the door at once.
    Andrew Jackson (1767–1845)

    A memory is a beautiful thing, it’s almost a desire that you miss.
    Gustave Flaubert (1821–1880)