http://bugs.winehq.org/show_bug.cgi?id=30465
--- Comment #6 from Ulrik Dickow u.dickow@gmail.com 2012-04-17 12:33:16 CDT --- Created attachment 39842 --> http://bugs.winehq.org/attachment.cgi?id=39842 Proposed tiny patch to MOZ_DOUBLE_IS_INT32 (only tested stand-alone)
Proposed patch to wine-gecko Master branch in git as of today, fixing mozilla.org
Bug 744965 - MOZ_DOUBLE_IS_INT32 shouldn't rely on undefined behavior
Note: I haven't set up a full wine-gecko build environment, so I've only tested this stand-alone in a small stand-alone program like attachment 39836.
With this patch, MOZ_DOUBLE_IS_INT32 also works when Gecko is compiled on x86 using the default 387 code (not SSE2) AND the application has chosen to enable Invalid operation floating point exceptions (e.g. set the FPU Control Word to 0x1372). The application may have good reason to do so for its own code. Gecko shouldn't, on its own, generate exceptions that spill out to the application.
Before putting the patch into production, someone should test that it doesn't slow down time critical JavaScript code by unreasonable amounts.