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/jsc.cpp

    r179479 r179993  
    11/*
    22 *  Copyright (C) 1999-2000 Harri Porten ([email protected])
    3  *  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012, 2013 Apple Inc. All rights reserved.
     3 *  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012, 2013, 2015 Apple Inc. All rights reserved.
    44 *  Copyright (C) 2006 Bjoern Graf ([email protected])
    55 *
     
    11701170#endif
    11711171
    1172 #if OS(WINDOWS)
     1172#if OS(WINDOWS) && (defined(_M_X64) || defined(__x86_64__))
     1173    // The VS2013 runtime has a bug where it mis-detects AVX-capable processors
     1174    // if the feature has been disabled in firmware. This causes us to crash
     1175    // in some of the math functions. For now, we disable those optimizations
     1176    // because Microsoft is not going to fix the problem in VS2013.
     1177    // FIXME: http://webkit.org/b/141449: Remove this workaround when we switch to VS2015+.
     1178    _set_FMA3_enable(0);
     1179
    11731180    // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
    11741181    // 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.