[GHC] #9266: getDirectoryContents blow its stack in a huge directory

GHC ghc-devs at haskell.org
Fri Jul 4 21:09:36 UTC 2014


#9266: getDirectoryContents blow its stack in a huge directory
-------------------------------------+-------------------------------------
        Reporter:  joeyhess          |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:                    |          Version:  7.8.2
  libraries/directory                |         Keywords:
      Resolution:                    |     Architecture:  Unknown/Multiple
Operating System:  Linux             |       Difficulty:  Easy (less than 1
 Type of failure:  None/Unknown      |  hour)
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by joeyhess):

 While my patch avoids the stack overflow, getDirectoryContents still seems
 to be using more memory than I would expect if it's lazily generating the
 list of files. The test program uses around 600 mb.

 I think it also needs to use unsafeInterleaveIO, but have not been able to
 get that to work.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9266#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list