-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes get boundserror check in CI with v0.7 #43
Comments
Ah interesting find! It appears the problem arises here: https://github.com/disberd/SlottedRandomAccess.jl/blob/7e9def4c5f7d6b383a0933b28272dbefd0a7c3d2/src/compute_plr.jl#L17 Your Poisson process can give Comparing against julia> Array{Float64}(undef, 0, 10)
0×10 Matrix{Float64}
julia> ans[:, 1] .= 1
0-element view(::Matrix{Float64}, :, 1) with eltype Float64 this correctly does nothing since the array is empty. Whereas with UnsafeArrays, we have julia> let A = Array{Float64}(undef, 0, 10)
UA = UnsafeArray(pointer(A), (0, 10))
UA[:, 1] .= 1
end
ERROR: BoundsError: attempt to access 0×10 LinearIndices{2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}} at index [1, 1]
Stacktrace: So the problem is really upstream in UnsafeArrays itself. I'd recommend that in the short term, you remove or separately deal with the case where the random number generation gives But in the meantime, I'll open an issue with UnsafeArrays.jl since it should handle this correctly. |
Thanks a lot @MasonProtter for the super quick reply and for acqually finding a bug in my code :D. I should have noticed based on the error but I forgot I was also doing poisson random... |
Happy I could help 😄 |
Just an update @disberd the bug from upstream is now fixed: JuliaArrays/UnsafeArrays.jl#22 |
First of all thanks a lot for the package @MasonProtter, I just started playing with it and it already seems very useful
I just updated a small package of mine that uses Bumper from v0.6 to v0.7.
I tested locally shortly and everything works but when I push on CI some of the tests fail (apparently randomly) with a boundscheck error
Here are two examples differeent CI runs where once it failed on ubunut and once on linux:
https://github.com/disberd/SlottedRandomAccess.jl/actions/runs/10055141472/job/27791169494
https://github.com/disberd/SlottedRandomAccess.jl/actions/runs/10054986890?pr=5
The error always seems to appear at this line below:
https://github.com/disberd/SlottedRandomAccess.jl/blob/7e9def4c5f7d6b383a0933b28272dbefd0a7c3d2/src/compute_plr.jl#L71
I did not investigate further here what might be the issue (or if I am using the library wrongly), but it did not seem to happen with v0.6 and it seems to happen randomly which is more worring :D.
The text was updated successfully, but these errors were encountered: