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

Bounds error during dce #28

Closed
chethega opened this issue Mar 7, 2019 · 3 comments
Closed

Bounds error during dce #28

chethega opened this issue Mar 7, 2019 · 3 comments
Labels
bug Something isn't working upstream

Comments

@chethega
Copy link

chethega commented Mar 7, 2019

julia> Base.VERSION
v"1.2.0-DEV.357"
julia> using Cthulhu
julia> g(t)=Dict(t);

julia> @descend g([1=>2])
│ ─ %-1  = invoke g(::Array{Pair{Int64,Int64},1})::Dict{Int64,Int64}
CodeInfo(
    @ REPL[3]:1 within `g'
1 ─ %1 = invoke Main.Dict(_2::Array{Pair{Int64,Int64},1})::Dict{Int64,Int64}
└──      return %1
)
Select a call to descend into or ↩ to ascend. [q]uit.
Toggles: [o]ptimize, [w]arn, [d]ebuginfo.
Show: [L]LVM IR, [N]ative code
Advanced: dump [P]arams cache.

 • %1  = invoke Type(::Array{Pair{Int64,Int64},1})::Dict{Int64,Int64}
   ↩
ERROR: BoundsError: attempt to access 23-element Array{Int64,1} at index [0]
Stacktrace:
 [1] getindex(::Array{Int64,1}, ::Int64) at ./array.jl:728
 [2] Core.Compiler.IncrementalCompact(::Core.Compiler.IRCode, ::Bool) at ./compiler/ssair/ir.jl:510
 [3] dce!(::Core.CodeInfo, ::Core.MethodInstance) at /home/bruhns/.julia/packages/Cthulhu/eUNdq/src/reflection.jl:113
 [4] preprocess_ci!(::Core.CodeInfo, ::Core.MethodInstance, ::Bool) at ~/.julia/packages/Cthulhu/eUNdq/src/reflection.jl:143
...

julia> using Pkg; Pkg.status("Cthulhu")
    Status `~/.julia/environments/v1.2/Project.toml`
  [f68482b8] Cthulhu v0.1.0 #master (https://github.com/vchuravy/Cthulhu.jl)
@vchuravy vchuravy added bug Something isn't working upstream labels Mar 9, 2019
@quinnj
Copy link

quinnj commented May 17, 2019

I'm running into this same issue; any workaround?

@vchuravy
Copy link
Member

vchuravy commented May 17, 2019

In src/reflection.jl you can remove the dce call we should make that configurable

@vchuravy
Copy link
Member

Should be fixed on current Julia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

3 participants