Segfault
ELI5 — The Vibe Check
A segfault (segmentation fault) is what happens when a program tries to access memory it's not allowed to touch — like trying to walk into someone else's house. The operating system catches you and kills your program immediately. In C/C++, segfaults are a daily occurrence. In Python or JavaScript? Almost never, because those languages handle memory for you. It's the scariest one-word error message in computing.
Real Talk
A segmentation fault (SIGSEGV) occurs when a program attempts to access a memory location it's not permitted to access, or attempts to access memory in a way that's not allowed (e.g., writing to read-only memory). Common in C/C++ due to pointer errors: dereferencing null/dangling pointers, buffer overflows, and stack overflows. Memory-safe languages prevent segfaults by design.
When You'll Hear This
"The C extension segfaulted — time to run it through Valgrind." / "Rust's borrow checker exists so you never have to debug a segfault again."
Related Terms
Buffer Overflow
A buffer overflow is like trying to pour 10 gallons of water into a 1-gallon jug — it spills everywhere and can destroy things nearby.
Core Dump
A core dump is a snapshot of a program's memory at the moment it crashed — the crime scene photo of a software death.
Debug
Debugging is the process of finding and fixing the gremlins in your code. Something is broken, and you need to play detective — adding clues (console.
Memory Leak
A memory leak is when your program keeps grabbing more memory but never gives it back, like filling a bathtub without a drain.
Rust
Rust is a compiled systems programming language obsessed with memory safety.