DV.Generic.Mutable.fill does not check for out of bounds access
Open
bug
design-shed
- Dominant language
- Haskell
- Stars
- 400
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
So it should be either renamed as unsafeFill and/or bound checks added. It's possible this is not only one function with unsafe access.
``` haskell
module Fill where
import qualified Data.Vector.Unboxed.Mutable as MU
import qualified Data.Vector.Generic.Mutable as MG
import qualified Data.Vector.Fusion.Stream.Monadic as SS
main :: IO ()
main = do
mv <- MU.replicate 10 (1 :: Int)
MG.fill mv (SS.replicate 1000000 42)
return ()
```
```
[1 of 1] Compiling Fill ( /home/alexey/qqq/fill-sigsegv.hs, interpreted )
Ok, modules loaded: Fill.
*Fill> :main
Segmentation fault
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.