[GHC] #5437: hSetEncoding resource leak on Linux
GHC
cvs-ghc at haskell.org
Mon Aug 29 08:45:47 CEST 2011
#5437: hSetEncoding resource leak on Linux
-----------------------+----------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/base
Version: 6.12.1 | Keywords:
Testcase: | Blockedby:
Os: Linux | Blocking:
Architecture: x86 | Failure: Runtime crash
-----------------------+----------------------------------------------------
[[BR]]
toor at toor-desktop:~$ ghci
[[BR]]
GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help
[[BR]]
Loading package ghc-prim ... linking ... done.
[[BR]]
Loading package integer-gmp ... linking ... done.
[[BR]]
Loading package base ... linking ... done.
[[BR]]
Prelude> :m + System.IO
[[BR]]
Prelude System.IO> e <- mkTextEncoding "CP932"
[[BR]]
Prelude System.IO> mapM_ (\_->hSetEncoding stdout e) [1..10000]
[[BR]]
Prelude System.IO> mapM_ (\_->hSetEncoding stdout e) [1..100000]
[[BR]]
*** Exception: malloc: resource exhausted (out of memory)
[[BR]]
Prelude System.IO> <interactive>: out of memory (requested 1048576 [[BR]]
bytes)
[[BR]]
toor at toor-desktop:~$
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5437>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list