← All Articles

Segmentation Fault (Core Dumped) — What It Means in Plain English

What Does This Error Mean?

A segmentation fault means your program tried to access memory it's not allowed to touch. The operating system killed it to protect the system.

Common Causes

  • Dereferencing a null or wild pointer
  • Buffer overflow (writing past array bounds)
  • Use-after-free (accessing freed memory)
  • Infinite recursion (stack overflow)

How to Debug

1. Use GDB

gdb ./myprogram
run
bt  # backtrace shows where it crashed

2. Use AddressSanitizer

gcc -fsanitize=address -g myprogram.c -o myprogram