-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-Tools-ILVerificationIssues related to ilverify tool and IL verification in generalIssues related to ilverify tool and IL verification in generaluntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Description
While attempting to use ILVerify to diagnose a compiler output problem, it instead blew up in my face, dumping a NullReferenceException stack trace on me.
Reproduction Steps
- Install .NET 5.
- Install ILVerify.
- Download this test case and unzip it to a new folder.
- Open PowerShell and CD to that folder.
ilverify .\testcase.dll -r "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\5.0.13\*.dll"(Adjust .NET 5 path as needed)
Expected behavior
A correct program should not throw "boneheaded exceptions."
A diagnostic tool should provide helpful diagnostic information about the nature of errors encountered.
Actual behavior
Error: System.NullReferenceException: Object reference not set to an instance of an object.
at ILVerify.ILVerifyTypeSystemContext.VerifyModuleName(String simpleName, EcmaModule module)
at ILVerify.ILVerifyTypeSystemContext.ResolveAssemblyOrNetmodule(String simpleName, String verificationName, IAssemblyDesc containingAssembly, Boolean throwIfNotFound)
at ILVerify.ILVerifyTypeSystemContext.ResolveAssembly(AssemblyName name, Boolean throwIfNotFound)
at Internal.TypeSystem.Ecma.EcmaModule.ResolveAssemblyReference(AssemblyReferenceHandle handle)
at Internal.TypeSystem.Ecma.EcmaModule.EcmaObjectLookupHashtable.CreateValueFromKey(EntityHandle handle)
at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey key)
at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle handle, NotFoundBehavior notFoundBehavior)
at Internal.TypeSystem.Ecma.EcmaModule.ResolveTypeReference(TypeReferenceHandle handle)
at Internal.TypeSystem.Ecma.EcmaModule.EcmaObjectLookupHashtable.CreateValueFromKey(EntityHandle handle)
at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey key)
at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle handle, NotFoundBehavior notFoundBehavior)
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ResolveHandle(EntityHandle handle)
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseTypeImpl(SignatureTypeCode typeCode)
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseType(SignatureTypeCode typeCode)
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseTypeImpl()
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseType()
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseTypeImpl(SignatureTypeCode typeCode)
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseType(SignatureTypeCode typeCode)
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseTypeImpl()
at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseType()
at Internal.TypeSystem.Ecma.EcmaModule.ResolveTypeSpecification(TypeSpecificationHandle handle)
at Internal.TypeSystem.Ecma.EcmaModule.EcmaObjectLookupHashtable.CreateValueFromKey(EntityHandle handle)
at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey key)
at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle handle, NotFoundBehavior notFoundBehavior)
at Internal.TypeSystem.Ecma.EcmaModule.GetType(EntityHandle handle)
at Internal.TypeSystem.Ecma.EcmaType.InitializeBaseType()
at Internal.TypeSystem.Ecma.EcmaType.get_BaseType()
at Internal.TypeSystem.TypeDesc.get_IsDelegate()
at Internal.IL.ILImporter.ImportCall(ILOpcode opcode, Int32 token)
at Internal.IL.ILImporter.ImportBasicBlock(BasicBlock basicBlock)
at Internal.IL.ILImporter.ImportBasicBlocks()
at Internal.IL.ILImporter.Verify()
at ILVerify.Verifier.VerifyMethod(EcmaModule module, MethodIL methodIL, MethodDefinitionHandle methodHandle)
at ILVerify.Verifier.VerifyMethods(EcmaModule module, IEnumerable`1 methodHandles)+MoveNext()
at ILVerify.Verifier.Verify(PEReader peReader, MethodDefinitionHandle methodHandle)+MoveNext()
at ILVerify.Program.VerifyMethods(PEReader peReader, EcmaModule module, String path, Int32& numErrors, Int32& verifiedMethodCounter, Int32& methodCounter)
at ILVerify.Program.VerifyAssembly(PEReader peReader, EcmaModule module, String path)
at ILVerify.Program.Run()
at ILVerify.Program.Run(Options options)
Configuration
.NET 5, Windows 10, x64
Metadata
Metadata
Assignees
Labels
area-Tools-ILVerificationIssues related to ilverify tool and IL verification in generalIssues related to ilverify tool and IL verification in generaluntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner