[Mono-bugs] [Bug 25100] New - Arguments off-by-one in delegate calls from a pinvoked method
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
22 May 2002 00:15:56 -0000
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 joe@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=25100
--- shadow/25100 Tue May 21 20:15:56 2002
+++ shadow/25100.tmp.13042 Tue May 21 20:15:56 2002
@@ -0,0 +1,34 @@
+Bug#: 25100
+Product: Mono/Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: joe@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Arguments off-by-one in delegate calls from a pinvoked method
+
+If, in a non-static method, you create a delegate and call a pinvoke method
+which is supposed to call back into that delegate, the arguments are off by
+one... Presumably it is passing the instance in as the first argument, then
+the real first one as the second, etc.
+
+Attached is a test case which shows the problem.
+
+Build testlib.c something like this:
+gcc -g -o libtestlib.so -shared testlib.c
+
+and testlib.cs like so:
+mcs -o testlib.exe testlib.cs
+
+And run it. Make sure LD_LIBRARY_PATH is set so libtestlib.so can load,
+blah blah blah. You'll see that the expected output does not match the
+actual output and that the argument is off by one.