[darcs-users] Something is seriously wrong with Darcs on Windows

Simon Marlow marlowsd at gmail.com
Tue Apr 27 12:11:16 UTC 2010


On 26/04/2010 22:52, Simon Marlow wrote:
> On 24/04/10 15:07, Petr Rockai wrote:
>> Hi,
>>
>> Eric Kow<kowey at darcs.net> writes:
>>> 3. Work on darcs 2.4.2 resolving the Windows issue specifically
>> at this point, it is a matter of bumping h-s dependency to 0.4.12.
>>
>> I have (semi-accidentally) tracked this bug down to yet another lstat
>> screwup in GHC. On win32, System.Posix.Internals.lstat just gives random
>> data. The index size and existence is derived from this random data and
>> that explains both symptoms that have been observed.
>
> Could you submit a bug for that? I'm not by a Windows box right now to
> test it, but looking at the code it looks like lstat has exactly the
> same implementation as c_stat:
>

I see the problem.  In GHC 6.10.x, System.Posix.Internals.lstat was 
calling the 32-bit stat function, but the accessor functions st_sizeof 
and co are expecting the 64-bit stat struct.  Luckilly we never tickled 
the bug in GHC (and strictly speaking, System.Posix.Internals is not a 
public API).

In 6.12.x we fixed that bug, but at the same time we started using the 
Unicode variant of stat, so lstat/c_stat now take a CWString rather than 
a CString.

Cheers,
	Simon


More information about the darcs-users mailing list