[Mono-bugs] [Bug 73941][Nor] New - [PATCH] mono_marshal_get_runtime_invoke doesn't support MONO_TYPE_TYPEDBYREF

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 21 Mar 2005 15:16:17 -0500 (EST)


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 sebastien@ximian.com.

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

--- shadow/73941	2005-03-21 15:16:17.000000000 -0500
+++ shadow/73941.tmp.25213	2005-03-21 15:16:17.000000000 -0500
@@ -0,0 +1,73 @@
+Bug#: 73941
+Product: Mono: Runtime
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: sebastien@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] mono_marshal_get_runtime_invoke doesn't support MONO_TYPE_TYPEDBYREF
+
+Description of Problem:
+
+
+
+
+Steps to reproduce the problem:
+1. Compile this as a library
+
+[Test]
+[SecurityPermission (SecurityAction.Deny, Infrastructure = true)]
+[ExpectedException (typeof (SecurityException))]
+public void MakeTypedReference ()
+{
+	MethodInfo mi = typeof (TypedReference).GetMethod ("MakeTypedReference",
+BindingFlags.Static | BindingFlags.Public);
+	Assert.IsNotNull (mi.Invoke (null, new object [2] { null, new FieldInfo
+[0] }), "MakeTypedReference");
+}
+
+2. Execute with nunit
+
+
+Actual Results:
+***** MonoCasTests.System.TypedReferenceCas.MakeTypedReference
+ 
+** ERROR **: file marshal.c: line 3539 (mono_marshal_get_runtime_invoke):
+should not be reached
+aborting...
+Aborted
+
+
+Expected Results:
+1) MonoCasTests.System.TypedReferenceCas.MakeTypedReference : Expected:
+SecurityException but was TargetInvocationException
+
+
+How often does this happen? 
+Always
+
+
+Additional Information:
+Patch...
+
+Index: marshal.c
+===================================================================
+--- marshal.c   (revision 42050)
++++ marshal.c   (working copy)
+@@ -3532,6 +3532,7 @@
+        case MONO_TYPE_ARRAY:
+        case MONO_TYPE_SZARRAY:
+        case MONO_TYPE_OBJECT:
++       case MONO_TYPE_TYPEDBYREF:
+                /* nothing to do */
+                break;
+        case MONO_TYPE_PTR: