Commit 5521d34d authored by Simon Marlow's avatar Simon Marlow
Browse files

add test for #1791

parent aaab2ac2
......@@ -22,3 +22,6 @@ test('divbyzero',
compile_and_run, [''])
test('outofmem', exit_code(1), compile_and_run, [''])
test('outofmem2', compose(exit_code(251),
extra_run_opts('+RTS -M5m -RTS')),
compile_and_run, [''])
-- Test for bug #1791
import Control.Monad.ST
import Data.Array.ST
import Data.Array.MArray
import Data.Array.Base(unsafeNewArray_)
main = print (runST (do make_empty_table >> return ()))
make_empty_table:: ST s (STArray s (Int, Int) (Maybe ep))
make_empty_table =
unsafeNewArray_ ((1, 1), (16384, 16384))
Heap exhausted;
Current maximum heap size is 4997120 bytes (4 Mb);
use `+RTS -M<size>' to increase it.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment