[Mono-bugs] [Bug 79434][Wis] New - Order of members does not match MS

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 18 13:03:53 EDT 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 joncham at gmail.com.

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

--- shadow/79434	2006-09-18 13:03:53.000000000 -0400
+++ shadow/79434.tmp.18842	2006-09-18 13:03:53.000000000 -0400
@@ -0,0 +1,65 @@
+Bug#: 79434
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: joncham at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Order of members does not match MS
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The order of members in a class (specifically methods) does not match that
+of MS. Specifically, MS matches the order defined in. Mono always seems to
+put property get/set methods first (with get always before set). Then
+methods. This is problematic for COM/XPCOM interop. The vtable of unmanaged
+COM objects is determined by the corresponding layout of the managed
+interface definition. The MS compilers preserve this information. This
+means mcs/gmcs cannot be used to compile assemblies that will be used for
+COM/XPCOM interop, either on mono or on .Net.
+
+The sample uses reflection. I know this isn't reliable for method order and
+it's not what is used for the COM Interop infrastructure, but it's good
+enough in this case. The other option is to embed mono and look at the
+unmanaged structures, or use the Marshal.GetComSlotForMethodInfo method
+which does that.
+
+Steps to reproduce the problem:
+1. Compile attached sample with gmcs.
+2. Compile with csc.
+3. Run both under mono to see that order is different.
+
+Actual Results:
+$ mono bug_gmcs.exe
+get_test1
+get_test4
+set_test4
+get_test5
+set_test5
+test2
+test3
+
+Expected Results:
+$ mono bug_csc.exe
+test2
+get_test1
+test3
+set_test4
+get_test4
+get_test5
+set_test5
+
+How often does this happen? 
+Everytime.
+
+Additional Information:


More information about the mono-bugs mailing list