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

Isn't the backtrace part of the stack irrelevant to the printed backtrace? #39573

Closed
ghost opened this issue Feb 6, 2017 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented Feb 6, 2017

Here's part of a backtrace from some code I was debugging:

thread 'main' panicked at 'index out of bounds: the len is 2 but the index is 2', ../src/libcollections/vec.rs:1307
stack backtrace:
   1:        0x10c096928 - std::sys::backtrace::tracing::imp::write::hb03a0f85d9cccd1b
   2:        0x10c0983df - std::panicking::default_hook::{{closure}}::h945d25329ef3fdd6
   3:        0x10c097975 - std::panicking::default_hook::hc98de28314f7e4d1
   4:        0x10c097ec6 - std::panicking::rust_panic_with_hook::hf47d6a84575c96f5
   5:        0x10c097d64 - std::panicking::begin_panic::heb2e59d774c89ce6
   6:        0x10c097c82 - std::panicking::begin_panic_fmt::h2640a71eaf059834
   7:        0x10c097be7 - rust_begin_unwind
   8:        0x10c0c1250 - core::panicking::panic_fmt::h8e7400f6438ecb75
   9:        0x10c0c11c8 - core::panicking::panic_bounds_check::hc4942862a8542805
  10:        0x10c083405 - <collections::vec::Vec<T> as core::ops::Index<usize>>::index::h73d44d5aa7af8d44

Of the 16 spots on the stack, it looks like 7 of them are reporting the backtrace's own activity. Isn't that a waste or irrelevant to debugging, unless you're debugging the backtrace/panic feature itself?

Meta

$ rustc --version --verbose
rustc 1.13.0-nightly (a059cb2f3 2016-09-27)
binary: rustc
commit-hash: a059cb2f3344c0a9efae17dde3d0e16a55ce93db
commit-date: 2016-09-27
host: x86_64-apple-darwin
release: 1.13.0-nightly
@Stebalien
Copy link
Contributor

See: rust-lang/rfcs#1744

@ghost
Copy link
Author

ghost commented Feb 6, 2017

Closing in favor of rust-lang/rfcs#1744.

@ghost ghost closed this as completed Feb 6, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant