[Mono-bugs] [Bug 74649][Nor] Changed - NUnit test in corlib fails

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 19 Apr 2005 05:15:52 -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 flashdict@gmail.com.

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

--- shadow/74649	2005-04-19 04:59:52.000000000 -0400
+++ shadow/74649.tmp.22861	2005-04-19 05:15:52.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 74649
 Product: Mono: Runtime
 Version: 1.1
 OS: other
 OS Details: FreeBSD 6.0
-Status: NEEDINFO   
-Resolution: FIXED
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: io-layer
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: flashdict@gmail.com               
 QAContact: mono-bugs@ximian.com
@@ -76,6 +76,43 @@
 
 ** ERROR **: file ../../mono/io-layer/handles-private.h: line 331
 (_wapi_handle_share_release): assertion failed: (info->handle_refs > 0)
 aborting...
 
 Setting priority down, anyhow.
+
+------- Additional Comments From flashdict@gmail.com  2005-04-19 05:15 -------
+Ah.  Now I see the problem.  The bug is only visible when the same
+stream is opend twice in a subroutine.  On this system, the following
+code failes every second try.  Weird.
+
+using System;
+using System.IO;
+
+public class Test
+{
+        public static void Main(string[] args)
+        {
+                foo();
+        }
+        public static void foo()
+        {
+                string path = "ThisIsMyTestPathFor.Test"; 
+                FileStream stream = null;
+                FileStream stream2 = null;
+                try{
+                        stream = new FileStream (path,
+FileMode.CreateNew);
+                        stream2 = new FileStream (path,
+FileMode.OpenOrCreate);
+                }
+                finally{
+                        if (stream != null)
+                                stream.Close ();
+                        if (stream2 != null)
+                                stream2.Close ();
+                        if (File.Exists (path))
+                                File.Delete (path);
+                }
+        }
+}
+