Skip to content

hSetEncoding resource leak on Linux

[[BR]] toor@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@toor-desktop:~$

Trac metadata
Trac field Value
Version 6.12.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information