object.error: Privileged Instruction

Jonathan M Davis jmdavisProg at gmx.com
Sat Sep 22 12:49:57 PDT 2012


On Saturday, September 22, 2012 21:19:27 Maxim Fomin wrote:
> Privilege instruction is an assembly instruction which can be
> executed only at a certain executive process context, typically
> os kernel. AFAIK assert(false) was claimed to be implemented by
> dmd as a halt instruction, which is privileged one.
> 
> However, compiled code shows that dmd generates int 3 instruction
> for assert(false) statement and 61_6F_65_75 which is binary
> representation of "aoeu" for assert(false, "aoeu") statement and
> the latter is interpreted as privileged i/o instruction.

It's a normal assertion without -release. With -release, it's a halt 
instruction on Linux but IIRC it's something slightly different (albeit 
similar) on Windows, though it might be halt there too.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list