Difference Between Segmentation Fault and Bus Error
A Segmentation Fault (SIGSEGV) happens when a programme tries to access memory outside its allowed address space or in a limited way, like writing to read-only memory. This leads to a bad memory reference, which causes the programme to crash. A Bus Error (SIGBUS) happens when a programme tries to access memory in a way the hardware can’t handle.