This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2621,13 +2621,13 @@ VirtualCallStubManager::TraceResolver(
2621
2621
CONSISTENCY_CHECK (CheckPointer (pMT));
2622
2622
2623
2623
2624
- DispatchSlot slot (pMT->FindDispatchSlot (token, TRUE /* throwOnConflict */ ));
2624
+ DispatchSlot slot (pMT->FindDispatchSlot (token, FALSE /* throwOnConflict */ ));
2625
2625
2626
2626
if (slot.IsNull () && IsInterfaceToken (token) && pMT->IsComObjectType ())
2627
2627
{
2628
2628
MethodDesc * pItfMD = GetInterfaceMethodDescFromToken (token);
2629
2629
CONSISTENCY_CHECK (pItfMD->GetMethodTable ()->GetSlot (pItfMD->GetSlot ()) == pItfMD->GetMethodEntryPoint ());
2630
- slot = pItfMD->GetMethodTable ()->FindDispatchSlot (pItfMD->GetSlot (), TRUE /* throwOnConflict */ );
2630
+ slot = pItfMD->GetMethodTable ()->FindDispatchSlot (pItfMD->GetSlot (), FALSE /* throwOnConflict */ );
2631
2631
}
2632
2632
2633
2633
// The dispatch slot's target may change due to code versioning shortly after it was retrieved above for the trace. This
@@ -2636,7 +2636,9 @@ VirtualCallStubManager::TraceResolver(
2636
2636
// all native code versions, even if they aren't the one that was reported by this trace, see
2637
2637
// DebuggerController::PatchTrace() under case TRACE_MANAGED. This alleviates the StubManager from having to prevent the
2638
2638
// race that occurs here.
2639
- return (StubManager::TraceStub (slot.GetTarget (), trace));
2639
+ //
2640
+ // If the dispatch slot is null, we assume it's because of a diamond case in default interface method dispatch.
2641
+ return slot.IsNull () ? FALSE : (StubManager::TraceStub (slot.GetTarget (), trace));
2640
2642
}
2641
2643
2642
2644
#ifndef DACCESS_COMPILE
You can’t perform that action at this time.
0 commit comments