A Segmentation Fault and a Bus error are both signals indicating an error in memory access. A Segmentation Fault, or SIGSEGV, occurs when a program tries to read or write in a restricted area of memory or accesses memory that doesn’t exist. This is often due to dereferencing null pointers or out-of-bounds array indices.
On the other hand, a Bus error, or SIGBUS, happens when the physical memory accessed isn’t aligned properly for the type of operation attempted. For instance, trying to read a four-byte integer at an address not divisible by four. It’s less common than segmentation faults as most hardware today can handle unaligned access.