Skip to content

::rt::backtrace Backtraces are not very useful on Mac #1650

Closed
@catamorphism

Description

@catamorphism

If I do export RUST_LOG=rt.backtrace and then compile and run the following program:

fn z() { fail "fleh"; }

fn y() { z(); }

fn x() { y(); }

fn main() {
  x();
}

I would expect to see a backtrace that mentions the functions main, x, y, and z. Instead, I get:

rust: upcall fail 'fleh', ./src/test/run-fail/bt-test.rs:1
0   librustrt.dylib                     0x0000000102511279 __morestack + 9

I've seen similar results when running other programs. The stack trace says something about __morestack but nothing about function calls corresponding to the code the user wrote.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.O-macosOperating system: macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions