getDirectoryContents fails in GHC 6.5 snapshots, works in GHC 6.4.1 snapshots

Sigbjorn Finne sof at galois.com
Mon Aug 8 13:38:54 EDT 2005


I can repro it too. Looks as if the dirent.h implementation of the
mingw snapshot that the nightlies are using is spongled. Simple
stuff like

#include <stdio.h>
#include <errno.h>
#include <dirent.h>
int main()
{
  DIR* dp;
  struct dirent* de;

  dp = opendir("c:\\");
  while (de = readdir(dp)) {
      printf("%s\n",de->d_name);
  }
  closedir(dp);
  return 0;
}

fails. I'll upgrade and see if that improves matters.

--sigbjorn

----- Original Message ----- 
From: "Brian Smith" <brianlsmith at gmail.com>
To: <glasgow-haskell-bugs at haskell.org>
Sent: Monday, August 08, 2005 10:31
Subject: Re: getDirectoryContents fails in GHC 6.5 snapshots,works in GHC 
6.4.1 snapshots


> On 8/8/05, Simon Marlow <simonmar at microsoft.com> wrote:
>> On 29 July 2005 23:53, Brian Smith wrote:
>>
>> > On 7/20/05, Brian Smith <brianlsmith at gmail.com> wrote:
>> >> This bug breaks Cabal 1.0 and Cabal 1.1.1.
>> >> Expected results: passed
>> >> Actual results: *** Exception: c:\: getDirectoryContents: failed (No
>> >> error)
>> >>
>> I tried various versions and couldn't reproduce the error.  I tried:
>
> Yes, it fails for every directory. I actually noticed the problem by
> when using Cabal, which uses getDirectoryContents. But, I did some
> more testing. This works:
>
>    > ghc --make Main.lhs -o main
>    > main
>    passed
>
> But, this fails:
>
>    > ghci Main.lhs
>    Prelude Main> main
>        *** Exception: C:\temp\bugs\getDirectoryContents:
> getDirectoryContents: failed (
> No error)
>
> and this fails:
>
>    > runghc Main.lhs
>    *** Exception: C:\temp\bugs\getDirectoryContents:
> getDirectoryContents: failed (
> No error)
>
> This indicates to me that there is not any problem with my filesystem.
> Instead, it seems like it is likely a problem with the linker. Now, I
> see what the cause of the problem is:
>
> http://www.haskell.org//pipermail/cvs-ghc/2005-June/025579.html
> Sigbjorn Finne sof at galois.com wrote on Mon Jun 20 12:29:24 EDT 2005:
>> I'll switch over to using gcc-3.4.2 for the nightly builds to see where 
>> takes us.
>
> And, in my previous message I wrote:
>
>> Build 20050620 works fine, but Build 20050622 fails.
>> I noticed that on 2005-06-21 the build failed. I also noticed that
>> before 2005-06-21, the tar.gz's are ~1 larger than the ones after
>> 2005-06-21.
>
> - Brian
> _______________________________________________
> Glasgow-haskell-bugs mailing list
> Glasgow-haskell-bugs at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs 




More information about the Glasgow-haskell-bugs mailing list