[Mono-bugs] [Bug 43687][Nor] Changed - incorrect code when using null where a pointer is expected
Tue, 27 May 2003 04:46:42 -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 email@example.com.
--- shadow/43687 Tue May 27 04:11:48 2003
+++ shadow/43687.tmp.1671 Tue May 27 04:46:42 2003
@@ -1,23 +1,23 @@
-Summary: void * in P/Invoke signature causes runtime to abort.
+Summary: incorrect code when using null where a pointer is expected
The following program makes the runtime abort while compiling the method:
@@ -34,6 +34,18 @@
------- Additional Comments From firstname.lastname@example.org 2003-05-26 20:17 -------
In fact this happens with other pointer types as well.
------- Additional Comments From email@example.com 2003-05-27 04:11 -------
This is caused by the call to check_call_signature() in mini.c line 2926
+------- Additional Comments From firstname.lastname@example.org 2003-05-27 04:46 -------
+I made mini allow the construct, since the MS runtime accepts it.
+There is still a mcs issue, though: when using null where a pointer is
+expected, csc correctly uses:
+instead of the broken ldnull mcs produces.
+I would also hope that kind of code to be removed from our sources,
+since it is exceptionally ugly: using IntPtr as the argument type and
+IntPtr.Zero instead of null would make for cleaner code and not
+require the use of /unsafe.