Author: zoltan
Date: 2005-05-12 08:07:17 -0400 (Thu, 12 May 2005)
New Revision: 44431
Modified:
trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
Log:
2005-05-12 Zoltan Varga <[EMAIL PROTECTED]>
* ConstructorBuilder.cs MethodBuilder.cs (fixup): Throw an exception if
a
method body is empty. Fixes #74906.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-05-12
11:48:48 UTC (rev 44430)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-05-12
12:07:17 UTC (rev 44431)
@@ -1,8 +1,13 @@
+2005-05-12 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * ConstructorBuilder.cs MethodBuilder.cs (fixup): Throw an exception if
a
+ method body is empty. Fixes #74906.
+
2005-04-13 Marek Safar <[EMAIL PROTECTED]>
- * TypeBuilder.cs (SetCustomAttribute): StructLayoutAttribute.CharSet
- has to overwrite current settings.
-
+ * TypeBuilder.cs (SetCustomAttribute): StructLayoutAttribute.CharSet
+ has to overwrite current settings.
+
2005-04-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* AssemblyBuilder.cs: Don't call GetCurrentDirectory if building an
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
2005-05-12 11:48:48 UTC (rev 44430)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
2005-05-12 12:07:17 UTC (rev 44431)
@@ -263,6 +263,10 @@
}
internal void fixup () {
+ if (((attrs & (MethodAttributes.Abstract |
MethodAttributes.PinvokeImpl)) == 0) && (iattrs & (MethodImplAttributes.Runtime
| MethodImplAttributes.InternalCall) == 0)) {
+ if ((ilgen == null) ||
(ILGenerator.Mono_GetCurrentOffset (ilgen) == 0))
+ throw new InvalidOperationException ("Method '"
+ Name + "' does not have a method body.");
+ }
if (ilgen != null)
ilgen.label_fixup ();
}
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2005-05-12 11:48:48 UTC (rev 44430)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2005-05-12 12:07:17 UTC (rev 44431)
@@ -250,6 +250,10 @@
}
internal void fixup () {
+ if (((attrs & (MethodAttributes.Abstract |
MethodAttributes.PinvokeImpl)) == 0) && (iattrs & (MethodImplAttributes.Runtime
| MethodImplAttributes.InternalCall) == 0)) {
+ if ((ilgen == null) ||
(ILGenerator.Mono_GetCurrentOffset (ilgen) == 0))
+ throw new InvalidOperationException
("Method '" + Name + "' does not have a method body.");
+ }
if (ilgen != null)
ilgen.label_fixup ();
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches