You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Navigate to the System.Runtime.CompilerServices.CallConvCdecl type
Ctrl+R for Analyze, expand 'Used By'
Error message shown
System.BadImageFormatException: Expected signature header for 'Property' or 'Method', but found '9' (0x09).
at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.CheckMethodOrPropertyHeader(SignatureHeader header)
at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeMethodSignature(BlobReader& blobReader)
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)
at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeTypeSequence(BlobReader& blobReader)
at System.Reflection.Metadata.StandaloneSignature.DecodeLocalSignature[TType,TGenericContext](ISignatureTypeProvider`2 provider, TGenericContext genericContext)
at ICSharpCode.Decompiler.TypeSystem.MetadataModule.DecodeLocalSignature(StandaloneSignatureHandle handle, GenericContext genericContext)
at ICSharpCode.ILSpy.Analyzers.Builtin.TypeUsedByAnalyzer.ScanMethodBody(TypeDefinitionUsedVisitor visitor, IMethod method, MethodBodyBlock methodBody, AnalyzerContext context)
at ICSharpCode.ILSpy.Analyzers.Builtin.TypeUsedByAnalyzer.<ScanType>d__1.MoveNext()
at ICSharpCode.ILSpy.Analyzers.Builtin.TypeUsedByAnalyzer.<Analyze>d__0.MoveNext()
at ICSharpCode.ILSpy.Analyzers.AnalyzerSearchTreeNode.<FetchChildren>d__10.MoveNext()
at ICSharpCode.ILSpy.TreeNodes.ThreadingSupport.<>c__DisplayClass5_0.<LoadChildren>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
Details
Product in use: ILSpy version 6.2.1.6137
The text was updated successfully, but these errors were encountered:
This is because ILSpy does not yet use a version of System.Reflection.Metadata that supports the new function pointer signature extensions. I believe @dgrunwald recently experimented with updating to a preview of SRM.
This particular crash should already be fixed in ILSpy master, as we've updated to a pre-release version of SRM 5 there.
However in general I think the analyzer should be catching BadImageFormatException and continue analyzing as much as possible. (such exceptions can also happen with obfuscated assemblies)
Steps to reproduce
Error message shown
Details
The text was updated successfully, but these errors were encountered: