General Protection Fault in module WIN87EM.DLL at 0001:02C6

General Protection Fault in module WIN87EM.DLL at 0001:02C6

[Revised 9 Dec 2014]

In some circumstances, the WIN87EM.DLL library tries to read the instruction bytes of the last FPU instruction executed based on the code segment and instruction pointer saved in the FPU environment.  Unfortunately, the code segment saved in the FPU environment may be NULL.   Loading from a NULL code segment is illegal, and the result is a general protection fault.

One reason for a NULL code segment is that you may be running on modern Intel CPUs with FCS/FDS deprecation [sic].  Beginning with Haswell CPUs, Intel no longer saves the code segment of the last FPU instruction executed (or the last FPU instruction to generate an exception) in the FPU environment.  On such hardware, you would encounter the general protection fault natively as well as in a VM.  A potential workaround is to hide the X87 coprocessor from the application.  For more information on this workaround, search the internet for "win87em.dll general protection fault".  Of course, performance will be adversely impacted, since all floating point operations will be emulated.

If you are running an older version of a VMware product, the NULL code segment may be the result of a VMware bug.  (This bug was fixed in our 2013 releases).  A workaround for this bug is to add the following option to your configuration file:

monitor_control.enable_rigorous_fpu_save_restore = TRUE


I tested to add monitor_control.enable_rigorous_fpu_save_restore = "TRUE" to the vmx-File, but this was not successful. Successful, but making the program too slow ist to block the math-coprocessor using in autoexec.nt. The only solution to avoid the General Protection Fault in module WIN87EM.DLL seems to use a computer with an AMD-CPU instead of newer Intel-CPUs.

For more Details see EGPFault in win87EM.dll bei neuen Intel-CPUs & und allen VMware-Player Versionen

Would masking SSE/FXSAVE/XSAVE from guest VM be a better workaround? Guest VM will still have full access to x87 FPU, but will not rely on FXSAVE to save/restore FPU states.

Version history
Revision #:
1 of 1
Last update:
‎03-05-2012 11:17 AM
Updated by: