Alex Rivera | Logout

What is a privileged instruction?

Asked 2008-09-18T02:56:25.713
32

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.

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).

Edit
Report

2 Answers

4

First probability that I can think of is, you may be using a local array and it is near the top of the function declaration. Your bounds checking gone insane and overwrite the return address and it points to some instruction that only kernel is allowed to execute.

answered 2008-09-18T03:04:03.557
2

I saw this with Visual c++ 6.0 in the year 2000.

The debug C++ library had calls to physical I/O instructions in it, in an exception handler. If I remember correctly, it was dumping status to an I/O port that used to be for DMA base registers, which I assume someone at Microsoft was using for a debugger card.

Look for some error condition that might be latent causing diagnostics code to run.

I was debugging, backtracked and read the dissassembly. It was an exception while processing std::string, maybe indexing off the end.

answered 2008-09-18T03:01:57.603

Your Answer