开发者

Is Segmentation Fault a.k.a Bus Error, an error or a fault? [closed]

It'开发者_运维知识库s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜