#7556: build/fold causes with ByteString unpack causes huge memory leak
--------------------------------------+-------------------------------------
Reporter: glguy | Owner: duncan
Type: bug | Status: closed
Priority: normal | Milestone: 7.8.1
Component: libraries (other) | Version: 7.6.1
Resolution: fixed | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Runtime performance bug | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
--------------------------------------+-------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
Fixed in bytestring head, will be in next point releases.
{{{
Tue Jan 8 16:43:21 GMT 2013 Duncan Coutts <[email protected]>
* Re-implement the foldr and foldl functions and fix unpack fusion
They were just wrong. The old foldr and foldl were doing strict
accumulation when they should be lazy.
Also, the fusion for (List.foldr f z . BS.unpack) was using a
tail-recursive variant on foldr (though not strictly accumulating)
which meant it would build up a huge chain of thunks when it should
be lazy and run in linear space. See ghc ticket 7556
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7556#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs