[vlc-devel] [PATCH] skins2: os2: save and restore FPU cw
KO Myung-Hun
komh78 at gmail.com
Fri Sep 12 14:04:51 CEST 2014
Backport to 2.1 tree, please...
KO Myung-Hun wrote:
> WinCreateMsgQueue() changes FPU cw but does not restore it. This causes
> SIGFPE later.
> ---
> modules/gui/skins2/os2/os2_factory.cpp | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/modules/gui/skins2/os2/os2_factory.cpp b/modules/gui/skins2/os2/os2_factory.cpp
> index 61170eb..2cbfb85 100644
> --- a/modules/gui/skins2/os2/os2_factory.cpp
> +++ b/modules/gui/skins2/os2/os2_factory.cpp
> @@ -31,6 +31,7 @@
> #include <io.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> +#include <cfloat>
>
> #include "os2_factory.hpp"
> #include "os2_graphics.hpp"
> @@ -169,8 +170,16 @@ bool OS2Factory::init()
> MorphToPM();
>
> m_hab = WinInitialize( 0 );
> +
> + // save FPU CW
> + unsigned saved_cw = _control87( 0, 0 );
> +
> + // WinCreateMsgQueue() changes FPU CW but does not restore it
> m_hmq = WinCreateMsgQueue( m_hab, 0 );
>
> + // restore FPU CW
> + _control87( saved_cw, MCW_EM | MCW_IC | MCW_RC | MCW_PC );
> +
> if( !WinRegisterClass( m_hab, vlc_class, OS2Factory::OS2Proc,
> CS_SIZEREDRAW, sizeof( PVOID )))
> {
--
KO Myung-Hun
Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
Korean OS/2 User Community : http://www.ecomstation.co.kr
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-skins2-os2-save-and-restore-FPU-cw.patch
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140912/54858282/attachment.ksh>
More information about the vlc-devel
mailing list