-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwing
Description
julia> VERSION
v"1.5.0-beta1.0"
julia> map!(+, [0,0,0], [1,2], [10,20,30], [100])
3-element Array{Int64,1}:
111
31
0
julia> map!(+, [0,0,0], [1,2], [10,20,30], [100])
3-element Array{Int64,1}:
111
4616658790
0
This also happened on v1.4.1
Pretty sure this commit removed the necessary bounds check: f9645ff
Probably, if @boundscheck LinearIndices(dest) == idxs1 && all(x -> LinearIndices(x) == idxs1, As)
evaluates to false, then BoundsError
should be thrown.
If I understand the intent correct, map!(+, [0,0,0], [1,2], [10,20,30], [100])
is supposed to error because the trailing arguments don't match the axes
of the second argument. Or at the very least because the last argument is smaller than the second argument.
gdalle, LilithHafner and nsajko
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwing