什么是特权指令? [英] What is a privileged instruction?

查看:283
本文介绍了什么是特权指令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我增加了一些code编译哪些干净,刚刚收到此Windows错误:

I have added some code which compiles cleanly and have just received this Windows error:

---------------------------
(MonTel Administrator) 2.12.7: MtAdmin.exe - Application Error
---------------------------
The exception Privileged instruction.

 (0xc0000096) occurred in the application at location 0x00486752.

我即将去一个bug狩猎,和我期待它是愚蠢的东西,我已经做了这恰好产生此消息。在code,没有错误或警告完全编译。 EXE文件的大小已发展到1454132字节,包括指向 ODCS.lib ,不过它也纯C到的Win32 API,与上DEBUG(在运行在Windows上&NBSP P4; 2000)

I am about to go on a bug hunt, and I am expecting it to be something silly that I have done which just happens to produce this message. The code compiles cleanly with no errors or warnings. The size of the EXE file has grown to 1,454,132 bytes and includes links to ODCS.lib, but it is otherwise pure C to the Win32 API, with DEBUG on (running on a P4 on Windows 2000).

推荐答案

要回答这个问题,一个特权指令,只能在导师执行的处理器OP-code(汇编指令)(或环-0)模式。
这些类型的指令往往被用来从窗口内核访问的I / O设备和受保护的数据结构

To answer the question, a privileged instruction is a processor op-code (assembler instruction) which can only be executed in "supervisor" (or Ring-0) mode. These types of instructions tend to be used to access I/O devices and protected data structures from the windows kernel.

常规程序运行于用户模式(环3)不允许直接访问I / O设备,等等...

Regular programs execute in "user mode" (Ring-3) which disallows direct access to I/O devices, etc...

正如其他人所提到的,原因很可能是一个损坏的堆栈或搞砸了函数指针调用。

As others mentioned, the cause is probably a corrupted stack or a messed up function pointer call.

这篇关于什么是特权指令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆