diff options
author | Fadi Hanna <fadim@microsoft.com> | 2018-05-09 00:19:13 +0300 |
---|---|---|
committer | Fadi Hanna <fadim@microsoft.com> | 2018-05-09 00:19:13 +0300 |
commit | feb4b14e880403a74d36e62e156fa394d699ddd9 (patch) | |
tree | 87349a4ecfee65c901ccd23b447cab9824eaf759 /src/ILCompiler.Compiler | |
parent | 2d6804d5d0c7957b8ed03f3fb0b8e49354a76a7f (diff) |
Fixing a bug with calls to USG vtable-methods wrapped in a calling convention converter thunk.
The issue was that the TypeBuilder creates calling convention converter thunks that uses mismatching method signatures and instantiation type arguments.
The fix is to encode the signature of the declaring method (where the vtable method appears first on the type hierarchy), to make it match with the instantiation arguments that the call converter uses for substitution.
[tfs-changeset: 1699090]
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs index b675e6016..f775ec526 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutVertexNode.cs @@ -1069,7 +1069,7 @@ namespace ILCompiler.DependencyAnalysis if (vtableSignatureNodeEntries == null) vtableSignatureNodeEntries = new List<NativeLayoutVertexNode>(); - vtableSignatureNodeEntries.Add(context.NativeLayout.MethodSignatureVertex(implMethod.GetTypicalMethodDefinition().Signature)); + vtableSignatureNodeEntries.Add(context.NativeLayout.MethodSignatureVertex(declMethod.GetTypicalMethodDefinition().Signature)); } } , _type, _type, _type); @@ -1107,7 +1107,7 @@ namespace ILCompiler.DependencyAnalysis conditionalDependencies = new List<CombinedDependencyListEntry>(); conditionalDependencies.Add( - new CombinedDependencyListEntry(context.NativeLayout.MethodSignatureVertex(implMethod.GetTypicalMethodDefinition().Signature), + new CombinedDependencyListEntry(context.NativeLayout.MethodSignatureVertex(declMethod.GetTypicalMethodDefinition().Signature), context.VirtualMethodUse(declMethod), "conditional vtable cctor sig")); } @@ -1339,7 +1339,7 @@ namespace ILCompiler.DependencyAnalysis if (vtableSignaturesSequence == null) vtableSignaturesSequence = new VertexSequence(); - NativeLayoutVertexNode methodSignature = factory.NativeLayout.MethodSignatureVertex(implMethod.GetTypicalMethodDefinition().Signature); + NativeLayoutVertexNode methodSignature = factory.NativeLayout.MethodSignatureVertex(declMethod.GetTypicalMethodDefinition().Signature); Vertex signatureVertex = GetNativeWriter(factory).GetRelativeOffsetSignature(methodSignature.WriteVertex(factory)); Vertex vtableSignatureEntry = writer.GetTuple( |