Skip to content

firstcaller can't handle interpreter frame #24658

@pbouffard

Description

@pbouffard

Initially thought this was an issue in Conda: JuliaPy/Conda.jl#94

The deprecation warning is issued but the function works as expected in most cases:

MacBook-Pro-3:julia patrick$ ./julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.2535 (2017-11-19 18:00 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 2e1ac64e0d (0 days old master)
|__/                   |  x86_64-apple-darwin16.7.0

julia> while !isdefined(:ROOTENV); break; end
WARNING: `isdefined(:symbol)` is deprecated, use `@isdefined symbol` instead
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:68
 [2] top-level scope at ./<missing>:?
 [3] eval(::Module, ::Expr) at ./repl/REPL.jl:3
 [4] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./repl/REPL.jl:69
 [5] macro expansion at ./repl/REPL.jl:100 [inlined]
 [6] (::getfield(Base.REPL, Symbol("##1#2")){Base.REPL.REPLBackend})() at ./event.jl:95
in expression starting at no file:0

julia> !isdefined(:ROOTENV)
WARNING: `isdefined(:symbol)` is deprecated, use `@isdefined symbol` instead
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:68
 [2] top-level scope
 [3] eval(::Module, ::Expr) at ./repl/REPL.jl:3
 [4] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./repl/REPL.jl:69
 [5] macro expansion at ./repl/REPL.jl:100 [inlined]
 [6] (::getfield(Base.REPL, Symbol("##1#2")){Base.REPL.REPLBackend})() at ./event.jl:95
in expression starting at no file:0
true

... but as part of an if statement causes a strange error:

julia> if !isdefined(:ROOTENV); println("not defined"); end
ERROR: type CodeInfo has no field def
Stacktrace:
 [1] firstcaller(::Array{Union{Ptr{Void}, Base.InterpreterIP},1}, ::Tuple{Symbol}) at ./deprecated.jl:100
 [2] firstcaller(::Array{Union{Ptr{Void}, Base.InterpreterIP},1}, ::Symbol) at ./deprecated.jl:84
 [3] depwarn(::String, ::Symbol) at ./deprecated.jl:69
 [4] top-level scope

julia> if isdefined(:ROOTENV); println("not defined"); end
ERROR: type CodeInfo has no field def
Stacktrace:
 [1] firstcaller(::Array{Union{Ptr{Void}, Base.InterpreterIP},1}, ::Tuple{Symbol}) at ./deprecated.jl:100
 [2] firstcaller(::Array{Union{Ptr{Void}, Base.InterpreterIP},1}, ::Symbol) at ./deprecated.jl:84
 [3] depwarn(::String, ::Symbol) at ./deprecated.jl:69
 [4] top-level scope
julia> versioninfo()
Julia Version 0.7.0-DEV.2535
Commit 2e1ac64e0d (2017-11-19 18:00 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin16.7.0)
  CPU: Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
Environment:

Note that I had some odd issues building Julia from source -- some parts of the build would only work when I had /usr/local/bin in my PATH and others only if it wasn't, so I had to run make a few times, switching the PATH between invocations.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions