haskell / haskell/vector

Memory safety in vector

Open
#298 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
400
Forks
145
PR merge metrics
No merged PRs in 30d

Description

Vector export a lot of functions which allows user to violate memory safety. I think it should be very straightforward to distinguish between memory-safe and memory-unsafe functions. Currently this is not the case: #118 as example of seemingly benign functions. #188 is such example as well. `unstream` implementation blindly trusts programmer supplied length and happily overwrites buffer.

I think good way to mark unsafe functions as unsafe is to either use `unsafe` prefix (unsafeIndex/unsafeWrite/...) or export from Unsafe/Internal module. This will be a lot of work but it on the plus side it will require handling memory safety in systematic way instead of playing fast and loose

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.