[Mono-bugs] [Bug 478652] New: UnixDirectoryInfo.Delete() won't throw an exception for non-existent directory

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 23 07:48:14 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=478652


           Summary: UnixDirectoryInfo.Delete() won't throw an exception
                    for non-existent directory
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: x86
        OS/Version: FreeBSD
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Mono.POSIX
        AssignedTo: miguel at novell.com
        ReportedBy: flz at xbsd.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.0.5)
Gecko/2009021309 Firefox/3.0.5

The bug triggers a crash in Banshee 1.4.2 as reported here
(http://bugzilla.gnome.org/show_bug.cgi?id=572829)

Test case by Bertrand Lorentz.

$ cat <<EOF > TestDelete.cs
public class TestDelete
{
    public static void Main()
    {
        Mono.Unix.UnixDirectoryInfo unix_dir = new Mono.Unix.UnixDirectoryInfo
("/tmp/non_existing");
        unix_dir.Delete (true);
    }
}
EOF

$ gmcs -rMono.Posix TestDelete.cs
$ mono TestDelete.exe

Reproducible: Always

Steps to Reproduce:
1.Compile supplied test case
2.Run the test case
3.Look at the stacktrace
Actual Results:  
Stacktrace:

  at (wrapper managed-to-native) Mono.Unix.Native.Syscall.sys_strerror_r
(int,System.Text.StringBuilder,ulong) <0x00004>
  at (wrapper managed-to-native) Mono.Unix.Native.Syscall.sys_strerror_r
(int,System.Text.StringBuilder,ulong) <0xffffffff>
  at Mono.Unix.Native.Syscall.strerror_r
(Mono.Unix.Native.Errno,System.Text.StringBuilder,ulong) <0x0001f>
  at Mono.Unix.Native.Syscall.strerror_r
(Mono.Unix.Native.Errno,System.Text.StringBuilder) <0x00032>
  at Mono.Unix.ErrorMarshal.strerror_r (Mono.Unix.Native.Errno) <0x00054>
  at Mono.Unix.ErrorMarshal..cctor () <0x00035>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
  at Mono.Unix.UnixMarshal.GetErrorDescription (Mono.Unix.Native.Errno)
<0xffffffff>
  at Mono.Unix.UnixMarshal.GetErrorDescription (Mono.Unix.Native.Errno)
<0x00008>
  at Mono.Unix.UnixMarshal.CreateExceptionForError (Mono.Unix.Native.Errno)
<0x0001c>
  at Mono.Unix.UnixMarshal.CreateExceptionForLastError () <0x00013>
  at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () <0x0000a>
  at Mono.Unix.UnixDirectoryInfo.GetEntries () <0x00053>
  at Mono.Unix.UnixDirectoryInfo.GetFileSystemEntries () <0x0000d>
  at Mono.Unix.UnixDirectoryInfo.Delete (bool) <0x0001c>
  at TestDelete.Main () <0x0002e>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
zsh: abort (core dumped)  mono ~/TestDelete.exe

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list