[Mono-bugs] [Bug 69196][Nor] New - CS0214 is not reported; check for unsafe pointer in method parameters
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 7 Nov 2004 05:54:59 -0500 (EST)
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 atsushi@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=69196
--- shadow/69196 2004-11-07 05:54:59.000000000 -0500
+++ shadow/69196.tmp.28706 2004-11-07 05:54:59.000000000 -0500
@@ -0,0 +1,40 @@
+Bug#: 69196
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: atsushi@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CS0214 is not reported; check for unsafe pointer in method parameters
+
+mcs basically checks pointer use in unsafe context, but it is not done for
+method parameters. See example below:
+
+public class Test
+{
+ public void Foo ()
+ {
+ Foo (null);
+ }
+
+ public static unsafe void Foo (int* buf) { }
+}
+
+Actual Results:
+No CS0214 error (error CS5001: Program cs0214.exe does not have an entry
+point defined)
+
+Expected Results:
+cs0214.cs(5,3): error CS0214: Pointers may only be used in an unsafe context
+
+How often does this happen?
+consistently.