Ticket #1791 (new feature request)
heap overflow should generate an exception
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | _|_ |
| Component: | Runtime System | Version: | 6.8 |
| Keywords: | Cc: | iampure@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | outofmem2 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
I want to use the -M option for the goals that are stated in the manual.
./TestProgram +RTS -M5m -RTS
Expected output:
Something like "out of heap space"
Actual result:
Machine going into a state where it swaps memory
This is the code for TestProgram?:
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))
This was tested with 6.9.20071018 on an athlon-xp, and confirmed by dcoutts also on x86-64 with ghc-6.8.0.20071015.
Change History
Note: See
TracTickets for help on using
tickets.
