Ticket #2093 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

getSymbolicLinkStatus (and possibly other functions) broken on systems with large file system support

Reported by: JeremyShaw Owned by:
Priority: normal Milestone: 6.8.3
Component: libraries/unix Version: 6.8.2
Keywords: Cc: gwern0@…
Operating System: Linux Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

This thread contains more details:

 http://www.haskell.org/pipermail/haskell-cafe/2008-February/039549.html

Basically, it appears that the unix module is built without the large filesystem support enabled, so it calls the 32-bit version of lstat. But hsc2hs includes header files that enable large file system support, so the offsets are for the stat64 struct. This means many fields in FileStatus? are filled with garbage.

I have attached a patch which adds the AC_SYS_LARGEFILE macro to configure.ac. This is the same macro which enables large file support in ghc. There could still be a problem however. For example, if you built ghc on a system without large file support, and but the unix module on a system with large file support -- then they would be out of sync. This patch seems better than the current situation however.

Attachments

unix-large-file-support.bundle Download (3.0 KB) - added by JeremyShaw 5 years ago.

Change History

Changed 5 years ago by JeremyShaw

Changed 5 years ago by JeremyShaw

Changed 5 years ago by igloo

  • difficulty set to Unknown

And also #2038

Changed 5 years ago by igloo

  • milestone set to 6.8.3

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Thanks for the patch! I've applied it to HEAD and 6.8 branch.

Changed 5 years ago by guest

  • cc gwern0@… added
Note: See TracTickets for help on using tickets.