[Mono-bugs] [Bug 66025][Nor] New - peverify error for mcs generated assembly
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 15 Sep 2004 13:58:09 -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 gert.driesen@pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=66025
--- shadow/66025 2004-09-15 13:58:09.000000000 -0400
+++ shadow/66025.tmp.19475 2004-09-15 13:58:09.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 66025
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gert.driesen@pandora.be
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: peverify error for mcs generated assembly
+
+When running .NET 2.0's peverify on an assembly built using mcs (for the
+code below), the following verify error is reported :
+
+===[VERERR] AREA='Global_type' [offset 0x00000000] [opcode nop]
+[MESSAGE:'zero-size function is not valid']
+
+To reproduce this, compile the following code using mcs (I used mcs built
+from cvs head):
+
+using System;
+using System.Reflection;
+
+namespace NAnt.Console {
+ public class ConsoleStub {
+ public static int Main(string[] args) {
+ try {
+ System.Console.WriteLine("A");
+ } catch (Exception e) {
+ System.Console.WriteLine("B");
+ } finally {
+ System.Console.WriteLine("C");
+ }
+
+ return 1;
+ }
+
+ private static readonly Type type = System.Reflection.MethodBase.
+ GetCurrentMethod().DeclaringType;
+ }
+}
+
+Next, use peverify from MS.NET 2.0 on the generated exe and you'll get
+the result mentioned above.
+
+Apparently the assembly that is built by mcs cannot even be disassembled
+completely using the MS.NET 2.0 ildasm.
+
+I'm not sure if this a regression in MS.NET 2.0, or a bug in Mono which
+is only detected in MS.NET 2.0.