logo       

Re: [GHC] #229: Integer overflow in array allocation: msg#00094

lang.haskell.glasgow.bugs

Subject: Re: [GHC] #229: Integer overflow in array allocation

#229: Integer overflow in array allocation
-----------------------------+----------------------------------------------
Reporter: josefs | Owner: simonmar
Type: bug | Status: assigned
Priority: lowest | Milestone:
Component: libraries/base | Version: 6.4.1
Severity: normal | Resolution: None
Keywords: | Os: Unknown
Difficulty: Unknown | Architecture: Unknown
-----------------------------+----------------------------------------------
Changes (by simonmar):

* architecture: => Unknown
* difficulty: => Unknown
* version: None => 6.4.1
* os: => Unknown

Old description:

> {{{
> When asked to create a sufficiently large array ghci
> coredumps.
>
> \begin{code}
> import Data.Array.ST
> import Control.Monad.ST
> import GHC.Base
>
> example = runST (do arr <- newArray (minInt,maxInt)
> False
> go arr)
> where go :: STArray s Int Bool -> ST s Bool
> go arr = readArray arr 3
> \end{code}
>
> Load this into ghci and type 'example'.
> }}}

New description:

{{{
When asked to create a sufficiently large array ghci
coredumps.

\begin{code}
import Data.Array.ST
import Control.Monad.ST
import GHC.Base

example = runST (do arr <- newArray (minInt,maxInt)
False
go arr)
where go :: STArray s Int Bool -> ST s Bool
go arr = readArray arr 3
\end{code}

Load this into ghci and type 'example'.
}}}

--
Ticket URL: <http://cvs.haskell.org/trac/ghc/ticket/229>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise