-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]regressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Description
MWE:
struct TextKmerIterator
data::Vector{UInt8}
stop::UInt # inclusive
end
function foo(x::TextKmerIterator)
kmer, i, k = UInt(0), UInt(1), UInt(0)
@inbounds while i ≤ x.stop
byte = x.data[i]
k += one(UInt)
i += 1
kmer = ((kmer << 2) & UInt(0x3f)) | 0x01
if k == 3
return kmer, (kmer, i, k-one(UInt))
end
end
return nothing
endAnd then
julia> it = TextKmerIterator(collect(codeunits("T")), 4)
Main.TextKmerIterator(UInt8[0x54], 0x0000000000000004)
julia> foo(it)
ERROR: BoundsError: attempt to access 1-element Vector{UInt8} at index [2]According to Nicholas Bauer on Slack, the culprit is
Line 1051 in 0b55425
| getindex(A::Array, i1::Integer, I::Integer...) = A[to_indices(A, (i1, I...))...] |
added in #36427 which lacks propagate inbounds.
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]regressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version