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

Commit 12f49f6

Browse files
Merge pull request #14531 from adityamandaleeka/r2r_exception_race_2.0.0
Fix deadlock in ReadyToRun scenarios between EH and code heap deletion [2.0.0]
2 parents 64eeb17 + 6b68ad6 commit 12f49f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/vm/codeman.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6829,6 +6829,14 @@ BOOL ReadyToRunJitManager::JitCodeToMethodInfo(RangeSection * pRangeSection,
68296829
if (MethodIndex < 0)
68306830
return FALSE;
68316831

6832+
if (ppMethodDesc == NULL && pCodeInfo == NULL)
6833+
{
6834+
// Bail early if caller doesn't care about the MethodDesc or EECodeInfo.
6835+
// Avoiding the method desc lookups below also prevents deadlocks when this
6836+
// is called from IsManagedCode.
6837+
return TRUE;
6838+
}
6839+
68326840
#ifdef WIN64EXCEPTIONS
68336841
// Save the raw entry
68346842
PTR_RUNTIME_FUNCTION RawFunctionEntry = pRuntimeFunctions + MethodIndex;

0 commit comments

Comments
 (0)