You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This illegal use of gallopingSearchLeftPBounds segfaults in ghci 8.6.5:
import Data.Vector.Algorithms.Search (binarySearchP, gallopingSearchLeftPBounds, binarySearch)
import qualified Data.Vector.Mutable as VM
import qualified Data.Vector as V
v <- V.thaw $ V.fromList [1,2,3]
gallopingSearchLeftPBounds (2 <) v 0 10
Note I give u = 10 when the maximum allowed values is 3 for the vector [1,2,3].
So it's expected that it fails.
However, a segfault is not expected, because I compile with default flags boundschecks = Enabled, and I the function doesn't have unsafe in the name or the docs, so I would expect a bounds check to happen.
The text was updated successfully, but these errors were encountered:
This illegal use of
gallopingSearchLeftPBounds
segfaults in ghci 8.6.5:Note I give
u = 10
when the maximum allowed values is3
for the vector[1,2,3]
.So it's expected that it fails.
However, a segfault is not expected, because I compile with default flags
boundschecks = Enabled
, and I the function doesn't haveunsafe
in the name or the docs, so I would expect a bounds check to happen.The text was updated successfully, but these errors were encountered: