Is Segmentation Fault a.k.a Bus Error, an error or a fault? [closed]
I'm confused. Segmentation Fault is also known as Bus Error. So how should it be categorized, an error or a fault. In windows term, it is also known as Illegal operation error. In my opinion it should be called an error, since it is caused by an underlying bug or a hardware fault.
I think an error is the manifestion of a fault rather the other way round. I am following the classification given by "Basic Concepts and Taxonomy of Dependable and Secure Computing". What do you guys think?
A segmentation fault is not quite the same thing as a bus-error. A segmentation fault is an error created by the OS-runtime that occurs when the running software attempts to access memory outside of an allowed memory-page. This is typically in relation to a protected memory OS that only allows user-mode processes to access memory in certain segments, and makes other memory segments restricted to higher-privileged kernel-processes. A bus-error on the other-hand is a hardware error that occurs when the software attempts to make a memory access that cannot be made by the hardware. The two types of errors can semantically coincide for instance on a processor architecture like x86 when a memory access is made, and the processor throws a general-protection fault or some other processor exception. But you can also have segmentation faults that are not caused by processor exceptions.
精彩评论