[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 hide87.com".  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