From: Jan Vorlicek Date: Fri, 10 May 2019 15:59:04 +0000 (+0200) Subject: Add module override for constraint type in method X-Git-Tag: submit/tizen/20210909.063632~11030^2~1555^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=815f970fd3a824984e89a6b7295a873edd09ef1d;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Add module override for constraint type in method The constraint type for method signature encoding was missing module zapsig when it was needed. Commit migrated from https://github.com/dotnet/coreclr/commit/c349128fa2244f74d16576088f9ef834c8b6a581 --- diff --git a/src/coreclr/src/vm/zapsig.cpp b/src/coreclr/src/vm/zapsig.cpp index 8feb7be..94be72a 100644 --- a/src/coreclr/src/vm/zapsig.cpp +++ b/src/coreclr/src/vm/zapsig.cpp @@ -1426,6 +1426,14 @@ BOOL ZapSig::EncodeMethod( if (fEncodeUsingResolvedTokenSpecStreams && pConstrainedResolvedToken->pTypeSpec != NULL) { _ASSERTE(pConstrainedResolvedToken->cbTypeSpec > 0); + + if (IsReadyToRunCompilation() && pMethod->GetModule()->IsInCurrentVersionBubble() && pInfoModule != (Module *) pConstrainedResolvedToken->tokenScope) + { + pSigBuilder->AppendElementType((CorElementType)ELEMENT_TYPE_MODULE_ZAPSIG); + DWORD index = (*((EncodeModuleCallback)pfnEncodeModule))(pEncodeModuleContext, (Module *) pConstrainedResolvedToken->tokenScope); + pSigBuilder->AppendData(index); + } + pSigBuilder->AppendBlob((PVOID)pConstrainedResolvedToken->pTypeSpec, pConstrainedResolvedToken->cbTypeSpec); } else