Abstract
- Also known as Segmentation Violation
- Represented with
SIGSEGV
- A common Runtime Error that occurs when a Process (进程) wants access Virtual Memory that it isn’t permitted to. So the Kernel will terminate the process due to safety reasons
- Can be handled with Null Safety
Common Causes
Indexing an Array beyond its boundary
Dereferencing Null Pointer
Ways to Handle
- Use Rust, Rust checks the index with the the range the program can access, if out of range, exit immediately with helpful error message instead of continuing and cause Segmentation Fault