[Mono-bugs] [Bug 22724] New - Use of uninitialized variable not detected

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
28 Mar 2002 23:00: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 duco@lorentz.xs4all.nl.

http://bugzilla.ximian.com/show_bug.cgi?id=22724

--- shadow/22724	Thu Mar 28 18:00:56 2002
+++ shadow/22724.tmp.6315	Thu Mar 28 18:00:56 2002
@@ -0,0 +1,42 @@
+Bug#: 22724
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: SuSE 7.1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: duco@lorentz.xs4all.nl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Use of uninitialized variable not detected
+
+Description of Problem:
+mcs does not detect the use of a uninitialized variable
+
+Steps to reproduce the problem:
+using System;
+
+class Test {
+
+        public static void Main ()
+        {
+                int i;
+
+                Console.WriteLine (i);
+        }
+}
+
+Actual Results:
+Program compiles and prints garbage ("mono") or zero ("mint").
+
+Expected Results:
+Compiler error (csc reports error CS0165)
+
+How often does this happen? 
+Always