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

Commit 6b68ad6

Browse files
Fix deadlock caused by R2R method info lookups during code heap
deletion.
1 parent 64eeb17 commit 6b68ad6

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)