DV.Generic.Mutable.fill does not check for out of bounds access
未关闭
bug
design-shed
- 主要语言
- Haskell
- 星标
- 400
- 派生
- 145
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。