[Haskell-cafe] STM, newArray, and a stack overflow?
Albert Y. C. Lai
trebla at vex.net
Fri Mar 25 04:44:56 CET 2011
On 11-03-23 05:31 PM, Ketil Malde wrote:
> Any idea why it works in GHCI?
Documentedly, stack limit is 8M, and can be changed by +RTS -K42M (for
Undocumentedly, certain magic numbers given to -K seem to waive the
limit (or set it so high I haven't fathomed).
GHC 6.10.4: 4 to 59
GHC 6.12.1: 4 to 63
GHC 6.12.3: 1 to 63
GHC 7.0.2: 1 to 67
In 6.10.4 and before, GHCI probably uses the same default stack limit as
other executables produced by GHC. You get stack overflow in GHCI as
Since 6.12.1, GHCI probably is built to default to a magic number, and
therefore you can't overflow its stack easily. You can bring back a
limit to GHCI by for example "ghci +RTS -K8M -RTS".
More information about the Haskell-Cafe