[Mono-bugs] [Bug 74906][Wis] New - S.R.E.CreateType() allows creation of a type with empty method body

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 11 May 2005 04:58:44 -0400 (EDT)


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 malekith@pld-linux.org.

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

--- shadow/74906	2005-05-11 04:58:44.000000000 -0400
+++ shadow/74906.tmp.23290	2005-05-11 04:58:44.000000000 -0400
@@ -0,0 +1,32 @@
+Bug#: 74906
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: malekith@pld-linux.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: S.R.E.CreateType() allows creation of a type with empty method body
+
+Description of Problem:
+
+When you create a method (or constructor) builder and not put any IL inside
+it with ILGenerator the TypeBuilder.CreateType will throw an exception on
+you under MS.NET. It's InvalidOperationException.
+
+Mono does not, and moreover it allows il generation after CreateType()
+which creates bogus IL because fixup_labels() is not called. This probably
+also should throw an exception.
+
+I hope it is not possible to obtain MethodBuilder from already finalized type.
+
+I filled bug against runtime, since it should probably happen on the C side
+(but I'm not sure).