Skip to content

Commit

Permalink
fix #24658, handle interpreted frames better in firstcaller
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Nov 21, 2017
1 parent 2dad958 commit ce2b3a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function firstcaller(bt::Vector, funcsyms)
found && @goto found
found = lkup.func in funcsyms
# look for constructor type name
if !found && lkup.linfo != nothing
if !found && lkup.linfo isa Core.MethodInstance
li = lkup.linfo
ft = ccall(:jl_first_argument_datatype, Any, (Any,), li.def.sig)
if isa(ft,DataType) && ft.name === Type.body.name
Expand Down
9 changes: 9 additions & 0 deletions test/deprecation_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,12 @@ end
@test_warn "deprecated" f21972()
@test_nowarn f21972()
end

f24658() = depwarn24658()

depwarn24658() = Base.firstcaller(backtrace(), :_func_not_found_)

@testset "firstcaller" begin
# issue #24658
@test eval(:(if true; f24658(); end)) == StackTraces.UNKNOWN
end

0 comments on commit ce2b3a4

Please sign in to comment.