Questions about this topic? Sign up to ask in the talk tab.

Segmentation fault

From NetSec
Revision as of 11:25, 6 September 2011 by MargeryLeddy (Talk | contribs) (Created page with "'''Segmentation fault''' (segfault) or '''access violation''' is when an application tries to access a wrong or unauthorized memory location, and its stopped by the [[operative s...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Segmentation fault (segfault) or access violation is when an application tries to access a wrong or unauthorized memory location, and its stopped by the operative system, generating an error.


Overview

With current operative systems, each process has one or more segments of the system memory which can store and retrieve information. Each process can request more or less memory (as needed), and the request will be recognized by the operating system and compared with the given memory section for the process. Generally, the process that requested memory is the only one who can read or modify it.

A segmentation fault occurs when a process attempts to access a portion of memory allocated into another application, or an unused area of memory, without permission. It usually occurs as a result of a programming error, for example, a pointer astray. Another way to get a "segmentation fault" is a physically broken memory, because a program written to memory would try to access that data, but since it has memory fails, it is possible that the data has been erased, thus the program will consider that memory address as empty, or unused, so it will trigger the error.