diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2019-01-22 18:08:31 +0100 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-01-22 09:08:30 -0800 |
commit | 1923d37f7f1ebc3d701621fa8bfed5cbdf26fba8 (patch) | |
tree | 4ed09621019d9228d07a63998909252c5b48476c | |
parent | 635a609eba8db8082a4e1245ce1291f9bbe9835c (diff) | |
download | coreclr-1923d37f7f1ebc3d701621fa8bfed5cbdf26fba8.tar.gz coreclr-1923d37f7f1ebc3d701621fa8bfed5cbdf26fba8.tar.bz2 coreclr-1923d37f7f1ebc3d701621fa8bfed5cbdf26fba8.zip |
Do not throw from TraceResolver (#22126)
Fixes #22059.
-rw-r--r-- | src/vm/virtualcallstub.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vm/virtualcallstub.cpp b/src/vm/virtualcallstub.cpp index 875ee1cc0d..31cfdd9a6d 100644 --- a/src/vm/virtualcallstub.cpp +++ b/src/vm/virtualcallstub.cpp @@ -2621,13 +2621,13 @@ VirtualCallStubManager::TraceResolver( CONSISTENCY_CHECK(CheckPointer(pMT)); - DispatchSlot slot(pMT->FindDispatchSlot(token, TRUE /* throwOnConflict */)); + DispatchSlot slot(pMT->FindDispatchSlot(token, FALSE /* throwOnConflict */)); if (slot.IsNull() && IsInterfaceToken(token) && pMT->IsComObjectType()) { MethodDesc * pItfMD = GetInterfaceMethodDescFromToken(token); CONSISTENCY_CHECK(pItfMD->GetMethodTable()->GetSlot(pItfMD->GetSlot()) == pItfMD->GetMethodEntryPoint()); - slot = pItfMD->GetMethodTable()->FindDispatchSlot(pItfMD->GetSlot(), TRUE /* throwOnConflict */); + slot = pItfMD->GetMethodTable()->FindDispatchSlot(pItfMD->GetSlot(), FALSE /* throwOnConflict */); } // 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( // all native code versions, even if they aren't the one that was reported by this trace, see // DebuggerController::PatchTrace() under case TRACE_MANAGED. This alleviates the StubManager from having to prevent the // race that occurs here. - return (StubManager::TraceStub(slot.GetTarget(), trace)); + // + // If the dispatch slot is null, we assume it's because of a diamond case in default interface method dispatch. + return slot.IsNull() ? FALSE : (StubManager::TraceStub(slot.GetTarget(), trace)); } #ifndef DACCESS_COMPILE |