From: Jan Kotas Date: Sun, 11 Mar 2018 02:29:42 +0000 (-0800) Subject: Set IsGeneratingNgenPDB flag early (#16882) X-Git-Tag: accepted/tizen/unified/20190422.045933~2685 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e332945b6e697fccbbbec3fb163c5161253e79c;p=platform%2Fupstream%2Fcoreclr.git Set IsGeneratingNgenPDB flag early (#16882) Fixes #16864 --- diff --git a/src/vm/compile.cpp b/src/vm/compile.cpp index 904dd99..28283b6 100644 --- a/src/vm/compile.cpp +++ b/src/vm/compile.cpp @@ -90,7 +90,6 @@ HRESULT CEECompileInfo::Startup( BOOL fForceDebug, HRESULT hr = S_OK; m_fCachingOfInliningHintsEnabled = TRUE; - m_fGeneratingNgenPDB = FALSE; _ASSERTE(!g_fEEStarted && !g_fEEInit && "You cannot run the EE inside an NGEN compilation process"); diff --git a/src/vm/compile.h b/src/vm/compile.h index bdcff9f..5be78c2 100644 --- a/src/vm/compile.h +++ b/src/vm/compile.h @@ -180,6 +180,11 @@ typedef SHash ZapperLoaderModuleTable; class CEECompileInfo : public ICorCompileInfo { public: + CEECompileInfo() + : m_fGeneratingNgenPDB(FALSE) + { + } + virtual ~CEECompileInfo() { WRAPPER_NO_CONTRACT; diff --git a/src/zap/zapper.cpp b/src/zap/zapper.cpp index 52f2ce4..59d05a0 100644 --- a/src/zap/zapper.cpp +++ b/src/zap/zapper.cpp @@ -167,6 +167,8 @@ STDAPI CreatePDBWorker(LPCWSTR pwzAssemblyPath, LPCWSTR pwzPlatformAssembliesPat EX_TRY { + GetCompileInfo()->SetIsGeneratingNgenPDB(TRUE); + NGenOptions ngo = {0}; ngo.dwSize = sizeof(NGenOptions); @@ -1061,8 +1063,6 @@ void Zapper::CreatePdbInCurrentDomain(BSTR pAssemblyPathOrName, BSTR pNativeImag { CORINFO_ASSEMBLY_HANDLE hAssembly = NULL; - m_pEECompileInfo->SetIsGeneratingNgenPDB(TRUE); - IfFailThrow(m_pEECompileInfo->LoadAssemblyByPath( pAssemblyPathOrName,