Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 37f3140

Browse files
author
John Chen
authored
Disable CER code that causes crashes (#8230)
This is a targeted fix for issue #8148.
1 parent 6735619 commit 37f3140

File tree

3 files changed

+8
-113
lines changed

3 files changed

+8
-113
lines changed

src/vm/constrainedexecutionregion.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ bool MethodCallGraphPreparer::Run()
168168
{
169169
STANDARD_VM_CONTRACT;
170170

171+
#ifdef FEATURE_CER
171172
// Avoid recursion while jitting methods for another preparation.
172173
if (!m_pThread->GetCerPreparationState()->CanPreparationProceed(m_pRootMD, m_pRootTypeContext))
173174
return TRUE; // Assume the worst
@@ -371,6 +372,9 @@ bool MethodCallGraphPreparer::Run()
371372
PrepareMethods();
372373

373374
return RecordResults();
375+
#else
376+
return FALSE;
377+
#endif
374378
}
375379

376380

@@ -1262,6 +1266,7 @@ void PrepareCriticalFinalizerObject(MethodTable *pMT, Module *pModule)
12621266
}
12631267
_ASSERTE(pParent != NULL);
12641268

1269+
#ifdef FEATURE_CER
12651270
BinderMethodID rgMethods[5];
12661271
int nMethods;
12671272

@@ -1311,6 +1316,7 @@ void PrepareCriticalFinalizerObject(MethodTable *pMT, Module *pModule)
13111316
}
13121317
}
13131318
}
1319+
#endif
13141320

13151321
// Note the fact that we've prepared this type before to prevent repetition of the work above. (Though repetition is harmless in
13161322
// all other respects, so there's no need to worry about the race setting this flag).
@@ -1781,7 +1787,7 @@ void PrepopulateGenericHandleCache(DictionaryLayout *pDictionaryLayout,
17811787
// is a no-op).
17821788
void CerNgenRootTable::Restore(MethodDesc *pRootMD)
17831789
{
1784-
#ifndef CROSSGEN_COMPILE
1790+
#if !defined(CROSSGEN_COMPILE) && defined(FEATURE_CER)
17851791
STANDARD_VM_CONTRACT;
17861792

17871793
// We don't have a restoration bitmap at ngen time. No matter, we just always claim everything is restored.
@@ -1904,7 +1910,7 @@ void CerNgenRootTable::Restore(MethodDesc *pRootMD)
19041910
}
19051911
pEntry++;
19061912
}
1907-
#endif // CROSSGEN_COMPILE
1913+
#endif // !CROSSGEN_COMPILE && FEATURE_CER
19081914
}
19091915

19101916
#ifdef FEATURE_NATIVE_IMAGE_GENERATION

tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b475589/b475589.il

Lines changed: 0 additions & 71 deletions
This file was deleted.

tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b475589/b475589.ilproj

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)