Skip to content

Better stack traces #521

Closed
Closed

Description

@RalfJung

Stack traces can be pretty unreadable currently, because we are showing the code of all call sites, including stuff somewhere deep in libstd that's between the startn-fn lang item and main.

We should be smarter and not print code snippets for all call sites.

Activity

  1. added
    C-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancement
    A-uxArea: This affects the general user experience
    on Nov 17, 2018
  2. RalfJung commented on Mar 28, 2020

    @RalfJung
    MemberAuthor

    Backtraces are better now since we don't show code outside the current crate.

    But I still find one thing pretty confusing: we print things like

       = note: inside call to `std::alloc::alloc` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/liballoc/alloc.rs:172:35
       = note: inside call to `<std::alloc::Global as std::alloc::AllocRef>::alloc` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/liballoc/alloc.rs:225:15
       = note: inside call to `alloc::alloc::exchange_malloc` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/liballoc/rc.rs:327:49
    

    Usually, backtraces pair up a function name with the relevant file and line inside that function. But Miri pairs up a function name with the file and line of its caller. I think that is unnecessarily confusing.

  3. added a commit that references this issue on Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-uxArea: This affects the general user experienceC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions