Skip to content
Search

Segmentation fault

lastmod 2021-06-09created 2015-04-0211 edits

A segmentation fault is a particular kind of error that can occur while computer software is running. It is also called a segmentation violation or segmentation failure, and is often shortened to segfault. A segmentation fault occurs when a program tries to access a memory area it is not allowed to access, or tries to access a memory area in a way that is not allowed. (For example, trying to write to a read-only area, or trying to overwrite an area used by the operating system.) Systems based on processors such as the Motorola 68000 tend to treat such errors as adress or bus errors.

Segmentation is a memory management and protection technique used by operating systems. It has largely been replaced by paging, but the term segmentation is still in use, as seen in the term "segmentation fault". Although paging is the predominant memory management policy, some operating systems still use segmentation at certain logical levels.

On Unix-like operating systems, a process that accesses invalid memory receives the SIGSEGV signal. On Microsoft Windows, a process that accesses invalid memory receives a STATUS_ACCESS_VIOLATION exception.

See also

Favorite site

References


  1. Understanding_EXC_BAD_ACCESS.pdf ↩

author Zer0 sitemap