Segmentation fault (core dumped)
A program accessed memory it wasn’t allowed to, and the kernel killed it with SIGSEGV (exit code 139).
Meaning
In your own C/C++/Rust-unsafe code it’s a memory bug (null/dangling pointer, buffer overflow, stack overflow). In Python, Node, PHP or Ruby it’s almost always a native extension crashing — or binary/library version mismatches.
Common causes
- Null or dangling pointer dereference
- Buffer overflow / out-of-bounds access
- Stack overflow from deep recursion
- Native extension built for a different library/runtime version
- Corrupted binary or bad RAM (rare)
⚡ Quick fix
- Run it under gdb to get a backtrace
- Rebuild/reinstall native extensions after upgrades
- Increase stack size if recursion is legitimate (
ulimit -s) - Use AddressSanitizer in development builds
Detailed fix by platform
Linux
- Get a backtrace:bash
gdb --args ./myprogram arg1 (gdb) run (gdb) bt # stack trace at the crash # or analyse a core dump: coredumpctl list && coredumpctl gdb
Python
python -X faulthandler app.pyprints the Python stack at a segfault, showing which C extension crashed.
How to diagnose
- Where — Backtrace — whose code crashed?
- Recent change — Upgraded runtime/library?
- Reproduce — Specific input triggers it?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026