summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-03-10 18:29:42 -0800
committerGitHub <noreply@github.com>2018-03-10 18:29:42 -0800
commit4e332945b6e697fccbbbec3fb163c5161253e79c (patch)
tree6489b7533c020b8a12f1aa8350d8d6f66aa9d587
parente35ba5a4574105b2c583570de1dbce1f75ccb928 (diff)
downloadcoreclr-4e332945b6e697fccbbbec3fb163c5161253e79c.tar.gz
coreclr-4e332945b6e697fccbbbec3fb163c5161253e79c.tar.bz2
coreclr-4e332945b6e697fccbbbec3fb163c5161253e79c.zip
Set IsGeneratingNgenPDB flag early (#16882)
Fixes #16864
-rw-r--r--src/vm/compile.cpp1
-rw-r--r--src/vm/compile.h5
-rw-r--r--src/zap/zapper.cpp4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/vm/compile.cpp b/src/vm/compile.cpp
index 904dd99c17..28283b662e 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 bdcff9fbe5..5be78c27bb 100644
--- a/src/vm/compile.h
+++ b/src/vm/compile.h
@@ -180,6 +180,11 @@ typedef SHash<ZapperLoaderModuleTableTraits> 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 52f2ce4468..59d05a08de 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,