icsharpcode / ILSpy

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
20.93k stars 3.31k forks source link

.NET 8 ReadyToRun not supported #3229

Closed KrisVandermotten closed 1 week ago

KrisVandermotten commented 3 weeks ago

Steps to reproduce

  1. Open a .NET 8 assembly, such as System.Private.CoreLib
  2. View ReadyToRun code

Error message shown

System.BadImageFormatException: Warning: Invalid ReadyToRun section type
   at ILCompiler.Reflection.ReadyToRun.ReadyToRunCoreHeader.ParseCoreHeader(Byte[] image, Int32& curOffset)
   at ILCompiler.Reflection.ReadyToRun.ReadyToRunHeader..ctor(Byte[] image, Int32 rva, Int32 curOffset)
   at ILCompiler.Reflection.ReadyToRun.ReadyToRunReader.EnsureHeader()
   at ICSharpCode.ILSpy.ReadyToRun.ReadyToRunLanguage.DecompileMethod(IMethod method, ITextOutput output, DecompilationOptions options)
   at ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput)
   at ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass51_0.<DecompileAsync>b__0()

Details

See also #2784

christophwille commented 3 weeks ago

Does that also happen with the latest 9.0 preview series?

christophwille commented 1 week ago

No feedback provided, closing.