Skip to content

"dotnet-pgo dump" throws "Same type X used as both ValueType and non-ValueType" #61604

Description

@EgorBo
Unhandled exception. System.Exception: Same type `[S.P.CoreLib]System.Runtime.InteropServices.GCHandle` used as both ValueType and non-ValueType
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemType.SetIsValueType(Boolean isValueType) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefTypeSystemType.cs:line 50
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemContext.TypeRefSignatureParserProvider.GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, Byte rawTypeKind) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefSignatureParserProvider.cs:line 138
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeTypeHandle(BlobReader& blobReader, Byte rawTypeKind, Boolean allowTypeSpecifications)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeMethodSignature(BlobReader& blobReader)
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemContext..ctor(IEnumerable`1 refReaders) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefTypeSystemContext.cs:line 102
   at Microsoft.Diagnostics.Tools.Pgo.Program.InnerDumpMain(CommandLineOptions commandLineOptions) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 254
   at Microsoft.Diagnostics.Tools.Pgo.Program.InnerMain(CommandLineOptions commandLineOptions) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 224
   at Microsoft.Diagnostics.Tools.Pgo.Program.Main(String[] args) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 129

and

Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemType
Unhandled exception. System.Exception: Same type `[S.P.CoreLib]System.Collections.Generic.KeyValuePair`2` used as both ValueType and non-ValueType

@AndyAyersMS @davidwrighton does it ring a bell? I used the latest version of dotnet-pgo tool (7.0.*)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions