Skip to content

[Power] First execution of backtrace() includes itself in trace #38858

@vchuravy

Description

@vchuravy
julia> bt1 = backtrace()
37-element Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}:
 Ptr{Nothing} @0x00007fff9eb4f0cf
 Ptr{Nothing} @0x00007fff9eb4f257
 Ptr{Nothing} @0x00007fffb24aa4f7
 Ptr{Nothing} @0x00007fffb24ca8eb
 Ptr{Nothing} @0x00007fffb24ca403
 Ptr{Nothing} @0x00007fffb24caf5b
 Ptr{Nothing} @0x00007fffb24cbe5f
 Base.InterpreterIP in top-level CodeInfo for Main at statement 0
...
julia> bt2=backtrace()
36-element Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}:
 Ptr{Nothing} @0x00007fff9eb4f257
 Ptr{Nothing} @0x00007fffb24aa4f7
 Ptr{Nothing} @0x00007fffb24ca8eb
 Ptr{Nothing} @0x00007fffb24ca403
 Ptr{Nothing} @0x00007fffb24caf5b
 Ptr{Nothing} @0x00007fffb24cbe5f
 Base.InterpreterIP in top-level CodeInfo for Main at statement 0
...
julia> Base.show_backtrace(stderr, bt1)

Stacktrace:
  [1] backtrace()
    @ Base ./error.jl:112
  [2] top-level scope

julia> Base.show_backtrace(stderr, bt2)

Stacktrace:
  [1] top-level scope
    @ REPL[2]:1

breaks one of the errorshow tests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions