Bugzilla – Bug 317507
[PATCH] mono_marshal_get_runtime_invoke doesn't support MONO_TYPE_TYPEDBYREF
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by sebastien@ximian.com 2005-03-21 15:16:17 MST ---- 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: ---- Additional Comments From vargaz@gmail.com 2005-03-22 07:02:23 MST ---- Fixed in SVN.