crash after writing around 40 gigabytes to stdout
After writing about 40GiB to stdout program crashes with one of these errors:
```
<stdout>: commitBuffer: invalid argument (Invalid argument)
<stdout>: hPutBuf: invalid argument (Invalid argument)
```
depending on which print function is used (Data.ByteString.Lazy.putStr or IO.putStrLn)
Occurs with 7.0.3, 7.0.2, win7 64bit, winxp 32bit
Compiled with one of these ghc calls:
```
ghc -rtsopts -threaded --make rec.hs -O2 -o rec.exe
ghc --make rec.hs -O2 -o rec.exe
ghc --make rec.hs -o rec.exe
```
Failed for both, with and without runtime settings:
```
rec +RTS -N2 -RTS > rec.txt
rec > rec.txt
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.0.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"crash after writing around 40 gigabytes to stdout","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.0.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"After writing about 40GiB to stdout program crashes with one of these errors:\r\n{{{\r\n<stdout>: commitBuffer: invalid argument (Invalid argument)\r\n<stdout>: hPutBuf: invalid argument (Invalid argument)\r\n}}}\r\ndepending on which print function is used (Data.ByteString.Lazy.putStr or IO.putStrLn)\r\n\r\nOccurs with 7.0.3, 7.0.2, win7 64bit, winxp 32bit\r\n\r\nCompiled with one of these ghc calls:\r\n{{{\r\nghc -rtsopts -threaded --make rec.hs -O2 -o rec.exe\r\nghc --make rec.hs -O2 -o rec.exe\r\nghc --make rec.hs -o rec.exe\r\n}}}\r\n\r\nFailed for both, with and without runtime settings:\r\n{{{\r\nrec +RTS -N2 -RTS > rec.txt\r\nrec > rec.txt\r\n}}}\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->
issue