Segmentation Fault (Core Dumped)
HardProgram tries to access memory it doesn't own, causing immediate crash.
Complete Debugging & Troubleshooting Guide
Errors involving memory allocation, access, and management
Program tries to access memory it doesn't own, causing immediate crash.
Program allocates memory but doesn't free it, causing gradual memory exhaustion.
Attempting to free memory that has already been freed.
Accessing memory after it has been deallocated.
Writing data beyond the boundaries of allocated memory.
Corruption of the heap data structure used for dynamic memory.
Errors involving the program stack and recursion
Program exceeds available stack space, usually from infinite recursion.
Stack protection mechanism detected buffer overflow on stack.
Errors from mathematical operations and logical problems
Division by zero or invalid floating-point operation.
Arithmetic operation exceeds integer type limits.
Program assertion condition evaluated to false.
Platform-specific runtime errors and system interactions
Windows-specific memory access violation (0xC0000005).
Misaligned memory access or hardware error on Unix systems.
CPU encountered an instruction it cannot execute.
Master these tools to efficiently debug runtime errors
Step through code, inspect variables, analyze core dumps
gdb ./program core
Learn GDB →
Detect memory leaks, buffer overflows, and use-after-free
valgrind --leak-check=full ./program
Learn Valgrind →
Fast memory error detector built into GCC/Clang
g++ -fsanitize=address -g program.cpp
Learn Sanitizers →
LLVM debugger for macOS and Xcode development
lldb ./program
Learn LLDB →
# Generate core dump
ulimit -c unlimited
# Analyze core dump
gdb ./program core
# Memory check
valgrind ./program
# Enable sanitizers
g++ -fsanitize=address,undefined
Or browse our complete troubleshooting guide