#2120: Arrays allow out-of-bounds indexes
-------------------------------+--------------------------------------------
 Reporter:  amthrax            |          Owner:          
     Type:  bug                |         Status:  new     
 Priority:  normal             |      Milestone:          
Component:  libraries (other)  |        Version:  6.8.2   
 Severity:  normal             |     Resolution:          
 Keywords:                     |     Difficulty:  Unknown 
 Testcase:                     |   Architecture:  Multiple
       Os:  Multiple           |  
-------------------------------+--------------------------------------------
Changes (by igloo):

  * difficulty:  => Unknown

Comment:

 When fixing #1046 and #1610, some people were worried about the
 performance overhead of checking both that the index was within the range
 (in terms of the Ix class), and also that we were looking for a value
 within the real range (i.e. offset in [0..rangeSize)).

 We used to do just the first check, which meant that you could access
 memory that you shouldn't with a funky Ix instance. Now we do just the
 second check, meaning if you ask for an out-of-range index then you might
 successfully get a value back.

 Would you like to make a
 [http://www.haskell.org/haskellwiki/Library_submissions proposal] for
 doing both checks?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2120#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to