[vector] #77: Data.Vector.Unboxed infinite loop

vector vector at projects.haskell.org
Mon Feb 20 22:26:57 GMT 2012


#77: Data.Vector.Unboxed infinite loop
-------------------+--------------------------------------------------------
Reporter:  mee     |       Owner:     
    Type:  defect  |      Status:  new
Priority:  minor   |   Milestone:     
 Version:          |    Keywords:     
-------------------+--------------------------------------------------------
 Here's the sum of it,

 {{{
 Prelude> import qualified Data.Vector.Unboxed as V
 Prelude Data.Vector.Unboxed> let zs = (V.++) (V.replicate 1 0) (V.generate
 2 (\_ -> (V.!) zs 0) )
 Loading package primitive-0.4.0.1 ... linking ... done.
 Loading package vector-0.9 ... linking ... done.
 Prelude Data.Vector.Unboxed> zs
 fromList   C-c C-cInterrupted.  <------- loops forever here

 Prelude Data.Vector.Unboxed> :m -Data.Vector.Unboxed
 Prelude> import qualified Data.Vector as V
 Prelude Data.Vector> let zs = (V.++) (V.replicate 1 0) (V.generate 2 (\_
 -> (V.!) zs 0) )
 Prelude Data.Vector> zs
 fromList [0,0,0]
 }}}

 The {{{ (V.!) zs 0 }}} loops forever in the unboxed version only.

 This behavior is the same across both of these configurations on
 Debian:[[BR]]

 ghc 7.0.4, vector 0.9.2 [[BR]]
 ghc 7.4.1, vector 0.9.1-2 [[BR]]

 I've had no luck changing the behavior by compiling with any of {{{ --fno-
 enable-rewrite-rules }}}, {{{ -fno-spec-constr }}} or toggling
 optimization.

 This might be related to #63, but I'm not sure how to tell.

-- 
Ticket URL: <http://trac.haskell.org/vector/ticket/77>
vector <http://trac.haskell.org/vector>
Package vector


More information about the vector mailing list