Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better stack traces #521

Closed
RalfJung opened this issue Nov 14, 2018 · 1 comment · Fixed by #1283
Closed

Better stack traces #521

RalfJung opened this issue Nov 14, 2018 · 1 comment · Fixed by #1283
Labels
A-ux Area: This affects the general user experience C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@RalfJung
Copy link
Member

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.

@RalfJung RalfJung added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement A-ux Area: This affects the general user experience labels Nov 17, 2018
@RalfJung
Copy link
Member Author

RalfJung commented Mar 28, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ux Area: This affects the general user experience C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant