diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2016-10-30 02:34:49 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-10-30 02:34:49 -0700 |
commit | 3fc65f37cd4bf5989647f6e1a48da6821ea5adbd (patch) | |
tree | 4f6fa777d4fa18608c8a9b3638f025b7d73d463c /src/vm/dllimportcallback.cpp | |
parent | d64c7d60fcc8132c8a57c5c3c9d6e296232520dd (diff) | |
download | coreclr-3fc65f37cd4bf5989647f6e1a48da6821ea5adbd.tar.gz coreclr-3fc65f37cd4bf5989647f6e1a48da6821ea5adbd.tar.bz2 coreclr-3fc65f37cd4bf5989647f6e1a48da6821ea5adbd.zip |
Work around a Visual C++ silent bad code generation bug (#7890)
Fixes #7837
The full description of the problem is in that issue.
Diffstat (limited to 'src/vm/dllimportcallback.cpp')
-rw-r--r-- | src/vm/dllimportcallback.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vm/dllimportcallback.cpp b/src/vm/dllimportcallback.cpp index 8db5a4fd48..cfac3cdb47 100644 --- a/src/vm/dllimportcallback.cpp +++ b/src/vm/dllimportcallback.cpp @@ -1320,7 +1320,9 @@ MethodDesc* UMThunkMarshInfo::GetILStubMethodDesc(MethodDesc* pInvokeMD, PInvoke dwStubFlags |= NDIRECTSTUB_FL_REVERSE_INTEROP; // could be either delegate interop or not--that info is passed in from the caller #if defined(DEBUGGING_SUPPORTED) - if (GetDebuggerCompileFlags(pSigInfo->GetModule(), CORJIT_FLAGS()).IsSet(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE)) + // Combining the next two lines, and eliminating jitDebuggerFlags, leads to bad codegen in x86 Release builds using Visual C++ 19.00.24215.1. + CORJIT_FLAGS jitDebuggerFlags = GetDebuggerCompileFlags(pSigInfo->GetModule(), CORJIT_FLAGS()); + if (jitDebuggerFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE)) { dwStubFlags |= NDIRECTSTUB_FL_GENERATEDEBUGGABLEIL; } @@ -1394,7 +1396,9 @@ VOID UMThunkMarshInfo::RunTimeInit() DWORD dwStubFlags = NDIRECTSTUB_FL_NGENEDSTUB | NDIRECTSTUB_FL_REVERSE_INTEROP | NDIRECTSTUB_FL_DELEGATE; #if defined(DEBUGGING_SUPPORTED) - if (GetDebuggerCompileFlags(GetModule(), CORJIT_FLAGS()).IsSet(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE)) + // Combining the next two lines, and eliminating jitDebuggerFlags, leads to bad codegen in x86 Release builds using Visual C++ 19.00.24215.1. + CORJIT_FLAGS jitDebuggerFlags = GetDebuggerCompileFlags(GetModule(), CORJIT_FLAGS()); + if (jitDebuggerFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE)) { dwStubFlags |= NDIRECTSTUB_FL_GENERATEDEBUGGABLEIL; } |