Skip to content
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

Inference crash due to BoundsError in meta_elim_pass! #18412

Closed
timholy opened this issue Sep 8, 2016 · 6 comments
Closed

Inference crash due to BoundsError in meta_elim_pass! #18412

timholy opened this issue Sep 8, 2016 · 6 comments
Assignees
Labels
compiler:inference Type inference
Milestone

Comments

@timholy
Copy link
Member

timholy commented Sep 8, 2016

Using the master branch of ImagesFiltering, julia master gives this:

julia> using ImagesFiltering, Colors

julia> img = fill(Gray(0), 5, 7); img[3,4] = 1
1

julia> kernel = centered([0.1 0.2; 0.4 0.5])
OffsetArrays.OffsetArray{Float64,2,Array{Float64,2}} with indices 0:1×0:1:
 0.1  0.2
 0.4  0.5

julia> imfilter(img, kernel)
WARNING: An error occurred during inference. Type inference is now partially disabled.
BoundsError(a=Array{Bool, 1}[], i=(0,))
rec_backtrace at /home/tim/src/julia-0.5/src/stackwalk.c:84
record_backtrace at /home/tim/src/julia-0.5/src/task.c:238
jl_throw at /home/tim/src/julia-0.5/src/task.c:560
jl_bounds_error_ints at /home/tim/src/julia-0.5/src/builtins.c:183
meta_elim_pass! at ./inference.jl:3382
finish at ./inference.jl:1926
typeinf_frame at ./inference.jl:1834
typeinf_loop at ./inference.jl:1641
typeinf_edge at ./inference.jl:1576
unknown function (ip: 0x7f40f64f722a)
jl_call_method_internal at /home/tim/src/julia-0.5/src/julia_internal.h:185 [inlined]
jl_apply_generic at /home/tim/src/julia-0.5/src/gf.c:1931
typeinf_edge at ./inference.jl:1582
unknown function (ip: 0x7f40f64f59fa)
jl_call_method_internal at /home/tim/src/julia-0.5/src/julia_internal.h:185 [inlined]
jl_apply_generic at /home/tim/src/julia-0.5/src/gf.c:1931
abstract_call_gf_by_type at ./inference.jl:866
unknown function (ip: 0x7f40f64f53d6)
...
abstract_eval at ./inference.jl:1125
unknown function (ip: 0x7f40f64efef6)
jl_call_method_internal at /home/tim/src/julia-0.5/src/julia_internal.h:185 [inlined]5×7 Array{ColorTypes.Gray{Float64},2}:
 Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)
 Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.5)  Gray{Float64}(0.4)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)
 Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.2)  Gray{Float64}(0.1)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)
 Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)
 Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)  Gray{Float64}(0.0)

julia> 

(with many similar lines omitted in the ...).

This does not happen on release-0.5.

@yuyichao yuyichao added the compiler:inference Type inference label Sep 8, 2016
@yuyichao yuyichao self-assigned this Sep 8, 2016
@yuyichao
Copy link
Contributor

yuyichao commented Sep 8, 2016

Simpler repro (i.e. test)

julia> Base.@propagate_inbounds function g(a)
           @inbounds b = a[1]
           return b
       end
g (generic function with 1 method)

julia> g([1])

Fix coming.

@tkelman
Copy link
Contributor

tkelman commented Sep 8, 2016

wrong milestone given

This does not happen on release-0.5.

@tkelman tkelman removed this from the 0.5.x milestone Sep 8, 2016
@StefanKarpinski StefanKarpinski added this to the 0.6.0 milestone Sep 8, 2016
@StefanKarpinski
Copy link
Member

Then don't just delete the milestone – apply the correct one.

@yuyichao
Copy link
Contributor

yuyichao commented Sep 8, 2016

So are we going to apply 0.6.0 milestone to every issue?

@StefanKarpinski
Copy link
Member

Every issue that we expect/hope to get done in the next release, yes. If we aren't sure it will be in the next release but expect it in 1.0, then apply the 1.0 milestone. If we'd like it some day, but it seems unlikely to happen by 1.0, then apply the 2.0 milestone. If it's unclear if we want it at all or if it's a real issue, then leave it with no milestone.

@tkelman
Copy link
Contributor

tkelman commented Sep 8, 2016

if it's not release blocking then we shouldn't put it on a release milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:inference Type inference
Projects
None yet
Development

No branches or pull requests

4 participants