cunixsegmentation-faultbus-error

What is a bus error? Is it different from a segmentation fault?


What does the "bus error" message mean, and how does it differ from a segmentation fault?


Solution

  • Bus errors are rare nowadays on x86 and occur when your processor cannot even attempt the memory access requested, typically:

    Segmentation faults occur when accessing memory which does not belong to your process. They are very common and are typically the result of:

    PS: To be more precise, it is not manipulating the pointer itself that will cause issues. It's accessing the memory it points to (dereferencing).