[Mono-bugs] [Bug 58881][Maj] Changed - [patch] marshalling of struct params to functions passed as unmanaged delegates broken
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 26 May 2004 16:36:39 -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 vladimir@pobox.com.
http://bugzilla.ximian.com/show_bug.cgi?id=58881
--- shadow/58881 2004-05-26 08:16:18.000000000 -0400
+++ shadow/58881.tmp.18847 2004-05-26 16:36:39.000000000 -0400
@@ -129,6 +129,18 @@
out, since it is not really a bug fix, rather an optimization.
------- Additional Comments From vargaz@freemail.hu 2004-05-26 08:16 -------
There seems to be some bugs in our calculation of blittableness which
surface after this patch is applied. For example, tests/pinvoke2.exe
now fails.
+
+------- Additional Comments From vladimir@pobox.com 2004-05-26 16:36 -------
+Hmm, I'll take a look at the failing test.
+
+It is a bug though; if you look at the original output from the sample
+code, even though the i,j fields are modified in the struct in the
+managed delegate, the unmanaged code never gets those modifications (i
+and j == 0 after return from invoking the managed delegate). The
+runtime never copies the contents back, I assume because it's treating
+the ref SomeStruct as [In] only? (I assume that ref should imply
+In/Out; otherwise, you have different behaviour depending on whether
+your ref argument is blittable or not.)