reko
reko copied to clipboard
Simple x64 assembler program fails with System.IndexOutOfRangeException
Subject: https://github.com/rfalke/decompiler-subjects/tree/master/from_holdec/linux_syscall_syscall/x64_elf
Output:
error: An error occurred during decompilation. System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Reko.Core.Dfa.Automaton+<GetMatches>d__5.MoveNext () [0x0005f] in <bec34eb899c3465589ce81a9ed177392>:0
at System.Collections.Generic.List`1[T].AddEnumerable (System.Collections.Generic.IEnumerable`1[T] enumerable) [0x00059] in <6b8bdf3aa3e64e7f91da81ece11b0637>:0
at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00062] in <6b8bdf3aa3e64e7f91da81ece11b0637>:0
at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <ed18e3fe06fa44609760033a111cc5d9>:0
at Reko.ImageLoaders.Elf.Relocators.ElfRelocator.FindMainFunction (Reko.Core.Program program, Reko.Core.Address addrEntry) [0x0005b] in <22369391f1ca476dbfd1ac0a972edd2c>:0
at Reko.ImageLoaders.Elf.ElfLoader.Relocate (Reko.Core.Program program, Reko.Core.Address addrLoad) [0x00042] in <22369391f1ca476dbfd1ac0a972edd2c>:0
at Reko.ImageLoaders.Elf.ElfImageLoader.Relocate (Reko.Core.Program program, Reko.Core.Address addrLoad) [0x00000] in <22369391f1ca476dbfd1ac0a972edd2c>:0
at Reko.Loading.Loader.LoadExecutable (System.String filename, System.Byte[] image, System.String loader, Reko.Core.Address addrLoad) [0x0008f] in <f784ede1b8914274810e7771ef01afaf>:0
at Reko.Decompiler.Load (System.String fileName, System.String loaderName) [0x0005e] in <f784ede1b8914274810e7771ef01afaf>:0
at Reko.CmdLine.CmdLineDriver.Decompile (System.Collections.Generic.Dictionary`2[TKey,TValue] pArgs) [0x00024] in <33809380fabe49adac486f7407cc5323>:0
h
Reko doesn't have this problem with a similar 32bit program at https://github.com/rfalke/decompiler-subjects/tree/master/from_holdec/linux_syscall_int80/ia32_elf