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

Difference between revisions of "Segmentation fault"

From NetSec
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
 
== Overview ==
 
== 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.
+
With current operating 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.
+
A segmentation fault occurs when a process attempts to access a portion of memory (or [[memory addresses]]) 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.
 +
 
 +
[[Category:Glossary]]

Latest revision as of 03:27, 22 October 2012

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


Overview

With current operating 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 (or memory addresses) 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.