diff options
author | scottmg <scottmg@chromium.org> | 2014-12-03 16:25:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-04 00:27:19 +0000 |
commit | 255cf5511b0932fd3e500089ca3d53bd7e5c13c9 (patch) | |
tree | c039d314495a66ed25bc0dde8b53df5181c49b4f | |
parent | 42eb0eef6896901103f03c37c7e1fdd6e87eac5e (diff) | |
download | chromium_src-255cf5511b0932fd3e500089ca3d53bd7e5c13c9.zip chromium_src-255cf5511b0932fd3e500089ca3d53bd7e5c13c9.tar.gz chromium_src-255cf5511b0932fd3e500089ca3d53bd7e5c13c9.tar.bz2 |
win: Disable use of FMA3 versions of CRT functions on x64
Using the FMA3 path in the CRT math functions is suspected of causing
crashes when disabled at the OS level.
R=cpu@chromium.org
BUG=436603
Review URL: https://codereview.chromium.org/771183004
Cr-Commit-Position: refs/heads/master@{#306728}
-rw-r--r-- | chrome/app/chrome_main.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc index 80cd0fb..360b7e5 100644 --- a/chrome/app/chrome_main.cc +++ b/chrome/app/chrome_main.cc @@ -31,6 +31,15 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, #elif defined(OS_POSIX) int ChromeMain(int argc, const char** argv) { #endif +#if defined(OS_WIN) && defined(ARCH_CPU_X86_64) + // VS2013 only checks the existence of FMA3 instructions, not the enabled-ness + // of them at the OS level (this is fixed in VS2015). We force off usage of + // FMA3 instructions in the CRT to avoid using that path and hitting illegal + // instructions when running on CPUs that support FMA3, but OSs that don't. + // See http://crbug.com/436603. + _set_FMA3_enable(0); +#endif // WIN && ARCH_CPU_X86_64 + ChromeMainDelegate chrome_main_delegate; content::ContentMainParams params(&chrome_main_delegate); |