[Mono-bugs] [Bug 77820][Nor] New - Cecil 0.3 throws an incorrect exception when trying to load an assembly.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 17 14:33:21 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bwp at bwp.dk.

http://bugzilla.ximian.com/show_bug.cgi?id=77820

--- shadow/77820	2006-03-17 14:33:21.000000000 -0500
+++ shadow/77820.tmp.32608	2006-03-17 14:33:21.000000000 -0500
@@ -0,0 +1,60 @@
+Bug#: 77820
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: Mono.Cecil
+AssignedTo: mono at evain.net                            
+ReportedBy: bwp at bwp.dk               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Cecil 0.3 throws an incorrect exception when trying to load an assembly.
+
+Description of Problem:
+
+ I want to read the CIL from an assembly, but Cecil fails to load it. Maybe
+related to Bug #75710, since the assembly is obfuscated.
+
+Steps to reproduce the problem:
+
+ C# code:
+ AssemblyDefinition assembly = AssemblyFactory.GetAssembly("Reflector.exe");
+
+Actual Results:
+
+ An exception. Here is the stack trace:
+ System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
+   at System.IO.__Error.EndOfFile()
+   at System.IO.BinaryReader.ReadChar()
+   at Mono.Cecil.Metadata.MetadataReader.VisitStringsHeap(StringsHeap heap)
+   at Mono.Cecil.Metadata.StringsHeap.Accept(IMetadataVisitor visitor)
+   at Mono.Cecil.Metadata.MetadataStream.Accept(IMetadataVisitor visitor)
+   at Mono.Cecil.Metadata.MetadataStreamCollection.Accept(IMetadataVisitor
+visitor)
+   at Mono.Cecil.Metadata.MetadataRoot.Accept(IMetadataVisitor visitor)
+   at Mono.Cecil.Binary.ImageReader.VisitCLIHeader(CLIHeader header)
+   at Mono.Cecil.Binary.Image.Accept(IBinaryVisitor visitor)
+   at Mono.Cecil.AssemblyFactory.GetAssembly(String file)
+   at AccessReflectorAssembly.Main(String[] args)
+
+Expected Results:
+
+ One of the following:
+ - Loads the assembly just fine.
+ - Throws some sort of Cecil defined exception saying that the assembly can
+not be loaded due to the format.
+
+How often does this happen?
+
+ Always.
+
+Additional Information:
+
+ I downloaded 'Reflector.exe' at:
+ http://www.aisto.com/roeder/dotnet/Download.aspx?File=Reflector


More information about the mono-bugs mailing list