[Mono-bugs] [Bug 75793][Nor] Changed - Mono doesn't run interface cctors when accessing fields

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 12 06:23:38 EDT 2005


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 jeroen at sumatra.nl.

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

--- shadow/75793	2005-08-12 06:06:02.000000000 -0400
+++ shadow/75793.tmp.5920	2005-08-12 06:23:38.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 75793
 Product: Mono: Runtime
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: swhite-monobugs at decisionsoft.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -51,6 +51,49 @@
 under Mono 1.1.8.1 and Mono 1.1.8.3)
 
 Expected Results:
   Outputs 'java.lang.Object at e1926e8' or similar when running the .class
 under Java, when running the .class under IKVM or when running the ikvmc
 compiled executable on .NET.
+
+------- Additional Comments From jeroen at sumatra.nl  2005-08-12 06:23 -------
+Here is the IL to reproduce the problem outside of IKVM:
+
+.assembly extern mscorlib {}
+.assembly bad {}
+.module bad
+
+.class interface private abstract auto ansi iBad
+{
+  .field public static initonly object o
+  .method public specialname rtspecialname static 
+          void  .cctor() cil managed
+  {
+    .maxstack  1
+    newobj     instance void [mscorlib]System.Object::.ctor()
+    stsfld     object iBad::o
+    ret
+  }
+}
+
+.class public auto ansi beforefieldinit bad
+       implements iBad
+{
+  .method public static void  main() cil managed
+  {
+    .entrypoint
+    .maxstack  1
+    ldsfld     object iBad::o
+    call       void [mscorlib]System.Console::WriteLine(object)
+    ret
+  }
+
+  .method public specialname rtspecialname 
+          instance void  .ctor() cil managed
+  {
+    .maxstack  1
+    ldarg.0
+    call       instance void [mscorlib]System.Object::.ctor()
+    ret
+  }
+}
+


More information about the mono-bugs mailing list