-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Steps to reproduce
Try decompile any of the below methods from netcoreapp3.1/5.0 with C#8.0(Ranges) enabled.
[System.Net.Primitives]System.Net.SocketAddress.ToString()
[System.Diagnostics.Process]System.Diagnostics.Process.GetMainWindowTitle()
[System.Security.Cryptography.Encoding]System.Security.Cryptography.PemEncoding.TryFind(...)//5.0 only
[System.Security.Cryptography.Pkcs]System.Security.Cryptography.Asn1.AsnWriter.WriteNamedBitList(Asn1Tag, ulong)//5.0 only
[System.Private.Uri]System.IPv6AddressHelper.ParseCanonicalName()
Error message shown
at ICSharpCode.Decompiler.IL.Transforms.ILInlining.CanMoveInto(ILInstruction expressionBeingMoved, ILInstruction stmt, ILInstruction targetLoad)
at ICSharpCode.Decompiler.IL.Transforms.IndexRangeTransform.<ICSharpCode.Decompiler.IL.Transforms.IStatementTransform.Run>g__TransformSlicing|2_1(Boolean sliceLengthWasMisdetectedAsStartOffset, <>c__DisplayClass2_0&)
at ICSharpCode.Decompiler.IL.Transforms.IndexRangeTransform.<ICSharpCode.Decompiler.IL.Transforms.IStatementTransform.Run>g__TransformIndexing|2_0(<>c__DisplayClass2_0&)
at ICSharpCode.Decompiler.IL.Transforms.IndexRangeTransform.ICSharpCode.Decompiler.IL.Transforms.IStatementTransform.Run(Block block, Int32 pos, StatementTransformContext context)
at ICSharpCode.Decompiler.IL.Transforms.StatementTransform.Run(Block block, BlockTransformContext context)
at ICSharpCode.Decompiler.IL.Block.RunTransforms(IEnumerable`1 transforms, BlockTransformContext context)
at ICSharpCode.Decompiler.IL.Transforms.BlockILTransform.VisitBlock(ControlFlowNode cfgNode, BlockTransformContext context)
at ICSharpCode.Decompiler.IL.Transforms.BlockILTransform.VisitBlock(ControlFlowNode cfgNode, BlockTransformContext context)
at ICSharpCode.Decompiler.IL.Transforms.BlockILTransform.VisitBlock(ControlFlowNode cfgNode, BlockTransformContext context)
at ICSharpCode.Decompiler.IL.Transforms.BlockILTransform.VisitBlock(ControlFlowNode cfgNode, BlockTransformContext context)
at ICSharpCode.Decompiler.IL.Transforms.BlockILTransform.Run(ILFunction function, ILTransformContext context)
at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileBody(IMethod method, EntityDeclaration entityDecl, DecompileRun decompileRun, ITypeResolveContext decompilationContext)
Details
- Product in use:
ILSpy
- Version in use: 6.0.0.5879(
5459d6b
, master) - Any other relevant information to the issue, or your interest in contributing a fix.
This is an new assert added in #2069 and not in 6.0.0.5836
The new validate code seems useful forSystem.Diagnostics.Process.GetMainWindowTitle()
, only the new version can proper decompile the fixed block in the method.