zoukankan      html  css  js  c++  java
  • General protection fault Exceptions in Linux/IA32 Systems

     Computer Systems A Programmer's Perspective Second Edition

    Exception number Description Exception class
    0 Divide error Fault
    13 General protection fault Fault
    14 Page fault Fault
    18 Machine check Abort
    32–127 OS-defined exceptions Interrupt or trap
    128 (0x80) System call Trap
    129–255 OS-defined exceptions Interrupt or trap
    Figure 8.9 Examples of exceptions in IA32 systems.

    Linux/IA32 Faults and Aborts
    Divide error. A divide error (exception 0) occurs when an application attempts to
    divide by zero, or when the result of a divide instruction is too big for the destina-
    tion operand. Unix does not attempt to recover from divide errors, opting instead
    to abort the program. Linux shells typically report divide errors as “Floating ex-
    ceptions.”
    General protection fault. The infamous general protection fault (exception 13)
    occurs for many reasons, usually because a program references an undefined area
    of virtual memory, or because the program attempts to write to a read-only text
    segment. Linux does not attempt to recover from this fault. Linux shells typically
    report general protection faults as “Segmentation faults.”
    Page fault. A page fault (exception 14) is an example of an exception where
    the faulting instruction is restarted. The handler maps the appropriate page of
    physical memory on disk into a page of virtual memory, and then restarts the
    faulting instruction. We will see how page faults work in detail in Chapter 9.
    Machine check. A machine check (exception 18) occurs as a result of a fatal
    hardware error that is detected during the execution of the faulting instruction.
    Machine check handlers never return control to the application program.

  • 相关阅读:
    MySql面试题、知识汇总、牛客网SQL专题练习
    产生过拟合的原因
    《人类简史》这本烧脑书风靡全球的秘密是什么?
    厌食?暴食?试试这个 VR 新疗法
    协程、异步IO
    进程池
    进程(同步)锁
    特朗普变脸:同媒体“友好会谈”,怨媒体“死不悔改”
    多进程Queue
    redis 在 php 中的应用(事务 [ Transaction ] 篇)
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6184553.html
Copyright © 2011-2022 走看看