Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

ERROR: UndefRefError: access to undefined reference #91

Closed
andreasnoack opened this issue May 1, 2016 · 1 comment
Closed

ERROR: UndefRefError: access to undefined reference #91

andreasnoack opened this issue May 1, 2016 · 1 comment

Comments

@andreasnoack
Copy link

When stepping through a function. Gallium, ASTInterpreter and julia are latest master. The steps to reproduce this are

julia> using Gallium

julia> Pkg.clone("https://github.com/andreasnoack/LinearAlgebra.jl")

julia> using LinearAlgebra

julia> A = randn(5,5);

julia> @enter LinearAlgebra.EigenGeneral.schurfact!(copy(A));
In /Users/andreasnoack/.julia/v0.5/LinearAlgebra/src/eigenGeneral.jl:142
141       end
142       schurfact!(A::StridedMatrix; tol = eps(), debug = false) = schurfact!(hessfact!(A), tol = tol, debug = debug)
143   
144       function singleShiftQR!(HH::StridedMatrix, τ::Rotation, shift::Number, istart::Integer, iend::Integer)

About to run: LinearAlgebra.EigenGeneral.#schurfact!#2
1|debug > s
In float.jl:414
413       eps(::Type{Float64}) = $(box(Float64,unbox(UInt64,0x3cb0000000000000)))
414       eps() = eps(Float64)
415   end
416   

About to run: Base.eps

1|debug > n
In float.jl:414
413       eps(::Type{Float64}) = $(box(Float64,unbox(UInt64,0x3cb0000000000000)))
414       eps() = eps(Float64)
415   end
416   

About to run: return 2.220446049250313e-16

1|debug > n
In /Users/andreasnoack/.julia/v0.5/LinearAlgebra/src/eigenGeneral.jl:142
141       end
142       schurfact!(A::StridedMatrix; tol = eps(), debug = false) = schurfact!(hessfact!(A), tol = tol, debug = debug)
143   
144       function singleShiftQR!(HH::StridedMatrix, τ::Rotation, shift::Number, istart::Integer, iend::Integer)

About to run: (LinearAlgebra.EigenGeneral.#schurfact!#2)(2.220446049250313e-16,false,LinearAlgebra.EigenGeneral.schurfact!,<suppressed 5×5 Array{Float64,2}>)

1|debug > s
In /Users/andreasnoack/.julia/v0.5/LinearAlgebra/src/eigenGeneral.jl:142
141       end
142       schurfact!(A::StridedMatrix; tol = eps(), debug = false) = schurfact!(hessfact!(A), tol = tol, debug = debug)
143   
144       function singleShiftQR!(HH::StridedMatrix, τ::Rotation, shift::Number, istart::Integer, iend::Integer)

About to run: top(Array)

1|debug > s
In boot.jl:325
324   Array{T}(::Type{T}, d::Int...) = Array{T}(d)
325   Array{T}(::Type{T}, m::Int)               = Array{T,1}(m)
326   Array{T}(::Type{T}, m::Int,n::Int)        = Array{T,2}(m,n)
327   Array{T}(::Type{T}, m::Int,n::Int,o::Int) = Array{T,3}(m,n,o)

About to run: top(apply_type)

1|debug > n
In boot.jl:325
324   Array{T}(::Type{T}, d::Int...) = Array{T}(d)
325   Array{T}(::Type{T}, m::Int)               = Array{T,1}(m)
326   Array{T}(::Type{T}, m::Int,n::Int)        = Array{T,2}(m,n)
327   Array{T}(::Type{T}, m::Int,n::Int,o::Int) = Array{T,3}(m,n,o)

ERROR: UndefRefError: access to undefined reference
 in astcopy(::Array{Any,1}) at ./expr.jl:41 (repeats 2 times)
 in copy(::Expr) at ./expr.jl:34
 in #print_status#14(::Bool, ::Function, ::ASTInterpreter.Interpreter, ::Array{Any,1}) at /Users/andreasnoack/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:280
 in (::ASTInterpreter.##59#65{ASTInterpreter.Interpreter,ASTInterpreter.#prompt#63,ASTInterpreter.InterpreterState,Base.LineEdit.Prompt,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at /Users/andreasnoack/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1442
 in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at ./LineEdit.jl:1570
 [inlined code] from ./LineEdit.jl:18
 in RunDebugREPL(::ASTInterpreter.Interpreter) at /Users/andreasnoack/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1503
 in eval(::Module, ::Any) at ./boot.jl:236
@andreasnoack
Copy link
Author

Much simpler example. It appears that Gallium just doesn't like undefined references

julia> function foo(n)
       x = cell(n)
       fill!(x, 1)
       return x
       end
foo (generic function with 1 method)

julia> @enter foo(5)
In REPL[2]:2
1 function foo(n)
2 x = cell(n)
3 fill!(x, 1)
4 return x
5 end

About to run: Main.cell
1|debug > n
In REPL[2]:2
1 function foo(n)
2 x = cell(n)
3 fill!(x, 1)
4 return x
5 end

ERROR: UndefRefError: access to undefined reference
 in astcopy(::Array{Any,1}) at ./expr.jl:33 (repeats 2 times)
 in copy(::Expr) at ./expr.jl:26
 in #print_status#14(::Bool, ::Function, ::ASTInterpreter.Interpreter, ::Array{Any,1}) at /Users/andreasnoack/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:280
 in (::ASTInterpreter.##59#65{ASTInterpreter.Interpreter,ASTInterpreter.InterpreterState,Base.LineEdit.Prompt,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at /Users/andreasnoack/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1440
 in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at ./LineEdit.jl:1570
 [inlined code] from ./LineEdit.jl:18
 in RunDebugREPL(::ASTInterpreter.Interpreter) at /Users/andreasnoack/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1501
 in eval(::Module, ::Any) at ./boot.jl:230

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant