[Mono-bugs] [Bug 77602][Wis] New - fail to save assembly or create reflection assembly with system librairies

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Feb 20 09:30:31 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 guillaume.bour at free.fr.


--- shadow/77602	2006-02-20 09:30:31.000000000 -0500
+++ shadow/77602.tmp.21997	2006-02-20 09:30:31.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 77602
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: Mono.Cecil
+AssignedTo: mono at evain.net                            
+ReportedBy: guillaume.bour at free.fr               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: fail to save assembly or create reflection assembly with system librairies
+Description of Problem:
+I would like to modify "on the fly" some libraries, but Cecil fail to save
+or create reflection from system libraries
+Steps to reproduce the problem:
+Assembly b = Assembly.Load("System, Version=1.0.5000.0, Culture=neutral,
+AssemblyDefinition assembly = AssemblyFactory.GetAssembly(b.Location);
+AssemblyFactory.SaveAssembly(assembly, "./test.dll");
+Actual Results:
+Unhandled Exception: System.OverflowException: Number overflow.
+in <0x00000> <unknown method>
+in (wrapper managed-to-native)
+System.Object:__icall_wrapper_mono_array_new_specific (intptr,int)
+in <0x00106> Mono.Cecil.Metadata.MetadataWriter:VisitMetadataRoot
+(Mono.Cecil.Metadata.MetadataRoot root)
+in <0x00019> Mono.Cecil.Metadata.MetadataRoot:Accept (IMetadataVisitor visitor)
+in <0x00500> Mono.Cecil.ReflectionWriter:TerminateModuleDefinition
+(Mono.Cecil.ModuleDefinition module)
+in <0x0011e> Mono.Cecil.StructureWriter:TerminateAssemblyDefinition
+(Mono.Cecil.AssemblyDefinition asm)
+in <0x0004b> Mono.Cecil.AssemblyDefinition:Accept
+(IReflectionStructureVisitor visitor)
+in <0x00034> Mono.Cecil.AssemblyFactory:WriteAssembly
+(Mono.Cecil.AssemblyDefinition asm, Mono.Cecil.Binary.MemoryBinaryWriter bw)
+in <0x0007f> Mono.Cecil.AssemblyFactory:SaveAssembly
+(Mono.Cecil.AssemblyDefinition asm, System.String file)
+in <0x0004d> TestCecil.CMain:Main (System.String[] args)
+Expected Results:
+  a new test.dll in local directory, copy of System.dll
+How often does this happen? 
+  Always
+Additional Information:
+  the problem is in the function
+Mono.Cecil.MetaData.MetaDataWriter::GetStrongNameSignatureSize (), the size
+value is lower than 32

More information about the mono-bugs mailing list