-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-Tools-ILVerificationIssues related to ilverify tool and IL verification in generalIssues related to ilverify tool and IL verification in generalhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
Description
While attempting to use ILVerify to diagnose a compiler output problem, it instead blew up in my face, dumping an IndexOutOfRangeException 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" -r "Boo.Lang.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.IndexOutOfRangeException: Index was outside the bounds of the array.
at Internal.IL.ILImporter.CreateBasicBlock(Int32 offset)
at Internal.IL.ILImporter.FindBasicBlocks()
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
Copilot
Metadata
Metadata
Assignees
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-Tools-ILVerificationIssues related to ilverify tool and IL verification in generalIssues related to ilverify tool and IL verification in generalhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged