logo       

[GHC] #871: compiler bug concerning arrays: msg#00132

lang.haskell.glasgow.bugs

Subject: [GHC] #871: compiler bug concerning arrays

#871: compiler bug concerning arrays
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.4.2
Severity: normal | Keywords:
Os: Linux | Difficulty: Unknown
Architecture: x86 |
-------------------------+--------------------------------------------------
It seems that ghc always gives up when an array is built using listArray
while the size of the given range is larger than the length of the list
and the range and the list are big enough.

The following is an example; it was created under SuSE 9.3:


{{{
nestra@linux:~/kodu/mat/inf/p/d/f/fpm/materjal/Tyybid> ghci -v
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.

Using package config file: /usr/lib/ghc-6.4.2/package.conf
Hsc static flags: -static
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Loading package base-1.0 ... linking ... done.
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Prelude> :m Array
Prelude Array> listArray (0 , maxBound :: Int) (replicate (2 ^ 22) 0)
*** Parser:
*** Desugar:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
array <interactive>: internal error: evacuate: strange closure type 16540
Please report this as a compiler bug. See:
http://www.haskell.org/ghc/reportabug
}}}

In the same case, Hugs gives a message "array index out of range".

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/871>
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