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-de?ned exceptions Interrupt or trap
128 (0x80) System call Trap
129–255 OS-de?ned 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 unde?ned 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.

时间: 2024-11-03 22:02:06

General protection fault Exceptions in Linux/IA32 Systems的相关文章

access violation at address General protection fault

https://en.wikipedia.org/wiki/General_protection_fault In memory errors, the faulting program accesses memory that it should not access. Examples include: Attempting to write to a read-only portion of memory Attempting to execute bytes in memory whic

How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems

(文档 ID 1062983.1) Applies to: Oracle Database - Enterprise Edition - Version 11.2.0.1.0 to 11.2.0.4 [Release 11.2]Information in this document applies to any platform. Goal It is not possible to directly restore a manual or automatic OCR backup if th

Linux 段错误详解

By Falcon of TinyLab.org 2015/05/12 背景 笔者早年写过一篇:<可恶的"Segmentation faults"之初级总结篇>,网络转载甚多.多年下来,关于段错误的讨论依旧很热烈,该问题也还是很常见.所以打算在这里再系统地梳理一下该问题的来龙去脉. 什么是段错误 下面是来自 Answers.com 的定义: A segmentation fault (often shortened to segfault) is a particular

linux中断源码分析 - 初始化(二)

本文为原创,转载请注明:http://www.cnblogs.com/tolimit/ 本篇文章主要讲述源码中是如何对中断进行一系列的初始化的. 回顾 在上一篇概述中,介绍了几个对于中断来说非常重要的数据结构,分别是:中断描述符表,中断描述符数组,中断描述符,中断控制器描述符,中断服务例程.可以说这几个结构组成了整个内核中断框架主体,所以内核对整个中断的初始化工作大多集中在了这几个结构上. 在系统中,当一个中断产生时,首先CPU会从中断描述符表中获取相应的中断向量,并根据中断向量的权限位判断是否

Early 80386 CPUs

Assembling a detailed and accurate history of the 80386, including a complete listing of all the "steppings" (revisions), when they were released, what "errata" (problems) each stepping suffered from, and which of those problems were f

free pascal 错误代码表

free pascal 错误代码表为了方便对照检查运行时错误代码,这里把所有的错误代码的含义整理出来.(最大序号为232,中间不一定连续.user.pdf P175)Run-time errors Applications generated by Free Pascal might generate run-time errors when certain abnormal conditions are detected in the application. This appendix li

【译】x86程序员手册26-7.5任务切换

7.5 Task Switching 任务切换 The 80386 switches execution to another task in any of four cases: 80386在以下四种情况下会切换另一个任务去执行: The current task executes a JMP or CALL that refers to a TSS descriptor. 当前任务执行了一个引用了TSS描述符的JMP或CALL. The current task executes a JMP

详谈 UNIX 环境进程异常退出

原文链接:http://www.ibm.com/developerworks/cn/aix/library/1206_xiejd_unixexception/ 详谈 UNIX 环境进程异常退出 本文详细论述 UNIX 环境上的进程异常退出,将导致进程异常退出的各种情景归纳为两类,对每类情况详细分析了问题出现的根本原因,同时添加了相应的实例以易于您更好地进行了解.在此基础上,文章最后论述了应该如何避免和调试进程异常退出问题.希望读者阅读此文后,对进程异常退出问题有更深层的认识,有更系统的梳理,对调

SWIG 3 中文手册——5. SWIG 基础知识

目录 5 SWIG 基础知识 5.1 运行 SWIG 5.1.1 输入格式 5.1.2 SWIG 输出 5.1.3 注释 5.1.4 C 预处理器 5.1.5 SWIG 命令 5.1.6 解析限制 5.2 包装简单的 C 声明 5.2.1 处理基本类型 5.2.2 全局变量 5.2.3 常量 5.2.4 一点关于 const 的文字 5.2.5 char * 的注意事项 5.3 指针与复杂对象 5.3.1 简单指针 5.3.2 运行时指针类型检查 5.3.3 派生类型.结构体和类 5.3.4 未