'Privileged instruction'.

Amex Amex at gmail.com
Sat May 25 19:28:06 UTC 2019


First-chance exception: 0xc0000096: Privileged instruction
Unhandled exception: 0xc0000096: Privileged instruction

Since this error only occurs in VS and not when running the app 
from the command line, surely these is a VS/VD issue?

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

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

I'm wondering if there is a bug in some VD code that causes this 
when handling exceptions in x64?


More information about the Digitalmars-d-ide mailing list