Ignore:
Timestamp:
Feb 12, 2015, 9:20:07 AM (10 years ago)
Author:
Brent Fulgham
Message:

[Win] [64-bit] Work around MSVC2013 Runtime Bug
https://bugs.webkit.org/show_bug.cgi?id=141498
<rdar://problem/19803642>

Reviewed by Anders Carlsson.

Disable FMA3 instruction use in the MSVC math library to
work around a VS2013 runtime crash. We can remove this
workaround when we switch to VS2015.

Source/JavaScriptCore:

  • API/tests/testapi.c: Call _set_FMA3_enable(0) to disable

FMA3 support.

to disable FMA3 support.

  • jsc.cpp: Ditto.
  • testRegExp.cpp: Ditto.

Source/WebKit/win:

  • WebKitDLL.cpp: Call _set_FMA3_enable(0) to disable FMA3 support.

Source/WTF:

  • WTF.vcxproj/WTF.vcxproj: Add new files.
  • WTF.vcxproj/WTF.vcxproj.filters: Ditto.
  • wtf/win/WTFDLL.cpp: Added.

Tools:

  • DumpRenderTree/cg/ImageDiffCG.cpp: Call _set_FMA3_enable(0) to

disable FMA3 support.

  • DumpRenderTree/win/DumpRenderTree.cpp: Ditto.
  • DumpRenderTree/win/ImageDiffCairo.cpp: Ditto.
  • DumpRenderTree/win/TestRunnerWin.cpp: Ditto.
  • Scripts/webkitperl/httpd.pm: Ditto.
  • TestWebKitAPI/win/main.cpp: Ditto.
  • WinLauncher/Common.cpp: Ditto.
  • win/DLLLauncher/DLLLauncherMain.cpp: Ditto.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/testRegExp.cpp

    r174455 r179993  
    11/*
    2  *  Copyright (C) 2011 Apple Inc. All rights reserved.
     2 *  Copyright (C) 2011, 2015 Apple Inc. All rights reserved.
    33 *
    44 *  This library is free software; you can redistribute it and/or
     
    164164{
    165165#if OS(WINDOWS)
     166#if defined(_M_X64) || defined(__x86_64__)
     167    // The VS2013 runtime has a bug where it mis-detects AVX-capable processors
     168    // if the feature has been disabled in firmware. This causes us to crash
     169    // in some of the math functions. For now, we disable those optimizations
     170    // because Microsoft is not going to fix the problem in VS2013.
     171    // FIXME: http://webkit.org/b/141449: Remove this workaround when we switch to VS2015+.
     172    _set_FMA3_enable(0);
     173#endif
     174
    166175    // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
    167176    // testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
Note: See TracChangeset for help on using the changeset viewer.