Skip to content

Commit ea8db02

Browse files
authored
Merge pull request #1198 from JuliaLang/show-bt
Make `show_bt()` robust against invalidations
2 parents 14f4832 + 307a3de commit ea8db02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/display.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ end
147147

148148
import Base: ip_matches_func
149149

150-
function show_bt(io::IO, top_func::Symbol, t, set)
150+
function show_bt(io::IO, top_func::Symbol, t::Vector)
151151
# follow PR #17570 code in removing top_func from backtrace
152152
eval_ind = findlast(addr->ip_matches_func(addr, top_func), t)
153153
eval_ind !== nothing && (t = t[1:eval_ind-1])
@@ -164,7 +164,7 @@ function error_content(e, bt=catch_backtrace();
164164
msg::AbstractString="")
165165
tb = map(String, split(sprint(show_bt,
166166
backtrace_top,
167-
bt, 1:typemax(Int); context=:color => true),
167+
bt; context=:color => true),
168168
"\n", keepempty=true))
169169

170170
ename = string(typeof(e))

0 commit comments

Comments
 (0)