[Mono-bugs] [Bug 58537][Wis] New - Mono does not handle GetTypeFormHandle on BB Border

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 14 May 2004 20:05:20 -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 bmaurer@users.sf.net.

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

--- shadow/58537	2004-05-14 20:05:20.000000000 -0400
+++ shadow/58537.tmp.12467	2004-05-14 20:05:20.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 58537
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono does not handle GetTypeFormHandle on BB Border
+
+Take the following IL code:
+
+.assembly 't' {}
+.method private static hidebysig default void 'Main' () cil managed 
+{
+	.entrypoint
+	
+	ldc.i4.1
+	brfalse OBJECT
+	
+	ldtoken [mscorlib]System.String
+	br AFTER
+OBJECT:
+	ldtoken [mscorlib]System.Object
+AFTER:
+	
+	
+	call class [mscorlib]'System.Type' class
+[mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype
+[mscorlib]'System.RuntimeTypeHandle')
+	call void class [mscorlib]'System.Console'::'WriteLine'(object)
+	ret 
+}
+
+
+In Mono we have;
+
+				if ((ip [5] == CEE_CALL) && (cmethod = mono_get_method_full (image,
+read32 (ip + 6), NULL, generic_context)) &&
+						(cmethod->klass == mono_defaults.monotype_class->parent) &&
+						(strcmp (cmethod->name, "GetTypeFromHandle") == 0)) {
+
+
+But that is incorrect here.