x64 Privileged instruction

Josphe Brigmo JospheBrigmo at gmail.com
Sat Sep 15 18:05:58 UTC 2018


On Saturday, 15 September 2018 at 14:57:20 UTC, Vladimir 
Panteleev wrote:
> On Thursday, 13 September 2018 at 05:50:53 UTC, Josphe Brigmo 
> wrote:
>>>> Privileged instruction
>>
>> Lots of code. I pretty much always get this error.
>
> Something must have gone really wrong to get this error. Most 
> likely, the CPU instruction pointer ended up in a memory area 
> without any code in it.
>
> Windows exception handling is tricky (see Don/Walter's recent 
> discussion), but basic cases should be well-covered by the 
> compiler/runtime test suite.
>
> So, I suspect one of the following happened:
>
> - Your program is exhibiting an edge case and uncovering a bug 
> not covered by the test case. If this is the case, please 
> reduce your program to a minimal, self-contained example, and 
> file a bug report.
>
> - There is a bug in your program that is causing its memory to 
> be corrupted. Using @safe can help narrow it down 
> (https://dlang.org/spec/memory-safe-d.html).
>
> - There is something specific to your machine that causes the 
> problem to occur there, but not on the test runners. This could 
> happen e.g. due to software which alter behavior of other 
> programs (like through DLL injection), or using a specific 
> Windows version. You can eliminate this possibility by running 
> the DMD test suite.

When I run the code in x86 the error is from a throw and is a 
first chance exception and the error message is shown as normal. 
In x64, no changes to source, it is a privileged instruction 
error.

I have always gotten these types of errors on x64 and, it may be 
my machine, it has happened with many dmd versions, visual D and 
visual studio...

I doubt it is my machine and it seems to be completely dmdx64's 
fault. Basically I just program in x86 most of the time and 
compile for x64 because of things like this.




More information about the Digitalmars-d-learn mailing list