Bug 317507 (MONO73941) - [PATCH] mono_marshal_get_runtime_invoke doesn't support MONO_TYPE_TYPEDBYREF
Summary: [PATCH] mono_marshal_get_runtime_invoke doesn't support MONO_TYPE_TYPEDBYREF
Status: RESOLVED FIXED
Alias: MONO73941
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.1
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-21 22:16 UTC by Sebastien Pouliot
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:11:16 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.