Error Codes Wiki

Linux Segmentation Fault (Signal 11)

Errorcommand

Overview

Linux Segmentation Fault (SIGSEGV, signal 11) means a program tried to access memory outside its allowed address space.

Key Details

  • Segfault — invalid memory access detected by MMU
  • Process terminated with exit code 139 (128 + 11)
  • Core dump may be generated for debugging
  • Common in C/C++ programs with pointer bugs

Common Causes

  • Null pointer dereference in the program
  • Buffer overflow accessing beyond array bounds
  • Use-after-free memory bug
  • Stack overflow from deep recursion

Steps

  1. 1Enable core dumps: ulimit -c unlimited
  2. 2Analyze core dump: gdb ./program core
  3. 3Run with AddressSanitizer: gcc -fsanitize=address
  4. 4Check for recent updates to the crashing program

Tags

linuxcommandsegmentation faulttroubleshootingfix

More in Command

Frequently Asked Questions

Almost always software — a bug in the program. Very rarely, bad RAM can cause random segfaults.