[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Segmentation Fault (Segfault)

Definition - What does Segmentation Fault (Segfault) mean?

A segmentation fault (segfault) is an error returned by hardware with memory protection that tells the operating system that a memory access violation has occurred. The operating system usually reacts by telling the offending process about the error through a signal and then the OS performs some sort of corrective action. This happens because a process or program tries to access memory that is not assigned to it.

A segmentation fault is also known as an access violation.

Techopedia explains Segmentation Fault (Segfault)

A segmentation fault is often caused by errors in the programming of a process or application in which the program is led to access memory that was not allocated for it but for other programs or for the system itself. A process is not allowed to touch memory not reserved for it, as it must always request memory before using it. Therefore, when it accidentally touches memory that is not assigned to it, an access violation occurs.

Segfaults can also be caused by a recursive function, which can use up all of the stack space it is assigned and quickly encroach on memory not assigned to it. In some systems, this is considered a stack overflow, but for others it is simply a kind of access violation.

A segmentation fault can be handled by a process through a custom signal handler, but often it is the OS's default signal handler that is used, which usually results in the offending process being terminated abnormally, called a crash, or the OS forcing a core dump.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.