[Mono-bugs] [Bug 75377][Nor] New - Cross-AppDomain delegate marshaling bug

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jun 25 10:56:23 EDT 2005

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 kornelpal at hotmail.com.


--- shadow/75377	2005-06-25 10:56:23.000000000 -0400
+++ shadow/75377.tmp.13150	2005-06-25 10:56:23.000000000 -0400
@@ -0,0 +1,38 @@
+Bug#: 75377
+Product: Mono: Runtime
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: interop
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: kornelpal at hotmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Cross-AppDomain delegate marshaling bug
+First of all: Mono has exactly the same behaviour regarding this bug 
+as .NET Framework but I think this is a bug.
+Try the attached test.
+A delegate is marshaled to unmanaged code then it is marshaled to managed 
+code in a different AppDomain.
+The problem is that the resulting delegate should be a remoting proxy 
+instead of a delegate that executes instance methods in a different 
+AppDomain than it was created.
+Delegates are objects. Delegates are marshaled and not the method they 
+point to. So there is nothing that could prevent the expected behaviour.
+This problem may cause unexpected behaviour of the object or even 
+security holes.
+Furthermore GCHandle throws ArgumentException to prevent using object in 
+a different AppDomain than they were created.

More information about the mono-bugs mailing list