On windows, hGetLine stdin leaks like an inside trader
-
Compile the following code, in GHC 6.10.1 or 6.8.3 on Windows XP.
-
Don't type anything, just bring up the task manager and wait.
-
Watch as the memory usage climbs, slowly, and then with increasing vigor.
-
If you start typing things, the memory usage will cease climbing.
main = do
forever $ do
x <- hGetLine stdin
putStrLn x
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |