[Haskell-cafe] getSymbolicLinkStatus completely broken on some 6.8.2 systems

Adam Langley agl at imperialviolet.org
Wed Feb 13 02:04:40 EST 2008


On Feb 12, 2008 10:44 PM, Adam Langley <agl at imperialviolet.org> wrote:
> Currently I'm looking at hsc2hs for this bug. On a 32 bit box here:

hsc2hs is forgiven; if you build with #define _FILE_OFFSET_BITS 32
then the structure is 96 bytes and the 64-bit offset is, indeed, at
offset 88.

However, if you end up calling the wrong libc lstat (and it's tough to
tell, because both lstat and lstat64 in libc call the system call
lstat64, so strace can't tell you) you'll only get an 88 byte
structure filled in. HsUnix.h has a wrapper around lstat for exactly
this reason, however ltrace shows it calling the wrong one.


-- 
Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       650-283-9641


More information about the Haskell-Cafe mailing list