SegmentationFault
What is SegmentationFault?
SegmentationFault: The process tried to access a memory address it is not allowed to touch — the operating system kills it immediately. A segmentation fault happens when a program tries to read or write memory it is not allowed to access. The operating system stops it immediately, often with only the message "Segmentation fault" and no further explanation.
Frequently asked questions about SegmentationFault
How is SegmentationFault used in practice?
It is typical in languages with manual memory management, like C and C++, where bugs such as using freed memory or reading past the end of an array cause it.
What should you keep in mind with SegmentationFault?
In PHP, Python or Node it usually points to a bug in a compiled extension or the runtime itself, not your own code. Common steps are updating the runtime and extensions, disabling extensions one by one, and checking whether the crash follows a specific input. In containers you may see exit code 139. Tools like gdb and core dumps help pinpoint the cause when it is reproducible.
At a glance
| Category | Error types |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |