From 53593a6dac14fbd89f4d13e31aa9bac5131d1fa1 Mon Sep 17 00:00:00 2001 From: Brian Sullivan Date: Thu, 20 Apr 2017 15:53:19 -0700 Subject: [PATCH] When we have profile data we can have cross module references in our ZapSig's when building ReadyToRun images. We should return a null TypeHandle to indicate failure so that we don't attempt to add generic types/methods that have cross module references. (i.e. MyList ) Commit migrated from https://github.com/dotnet/coreclr/commit/e13760cf8f64a4070ecbe4390a9d3b3170fe5de8 --- src/coreclr/src/vm/siginfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/coreclr/src/vm/siginfo.cpp b/src/coreclr/src/vm/siginfo.cpp index b9955ec..82aef45 100644 --- a/src/coreclr/src/vm/siginfo.cpp +++ b/src/coreclr/src/vm/siginfo.cpp @@ -1199,7 +1199,10 @@ TypeHandle SigPointer::GetTypeHandleThrowing( PREFIX_ASSUME(pZapSigContext != NULL); pModule = pZapSigContext->GetZapSigModule()->GetModuleFromIndex(ix); - if (pModule != NULL) + + // For ReadyToRunCompilation we return a null TypeHandle when we reference a non-local module + // + if ((pModule != NULL) && pModule->IsInCurrentVersionBubble()) { thRet = psig.GetTypeHandleThrowing(pModule, pTypeContext, -- 2.7.4