Skip to content

Commit

Permalink
Add __rust_begin_short_backtrace filter
Browse files Browse the repository at this point in the history
This frame was added for the exact purpose of allowing proper filtering:

rust-lang/rust#47429
  • Loading branch information
athre0z committed Aug 14, 2020
1 parent 41444d3 commit 390e22b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,11 @@ impl Frame {
/// Heuristically determine whether a frame is likely to be part of language
/// runtime.
fn is_runtime_init_code(&self) -> bool {
const SYM_PREFIXES: &[&str] =
&["std::rt::lang_start::", "test::run_test::run_test_inner::"];
const SYM_PREFIXES: &[&str] = &[
"std::rt::lang_start::",
"test::run_test::run_test_inner::",
"std::sys_common::backtrace::__rust_begin_short_backtrace",
];

let (name, file) = match (self.name.as_ref(), self.filename.as_ref()) {
(Some(name), Some(filename)) => (name, filename.to_string_lossy()),
Expand Down

2 comments on commit 390e22b

@athre0z
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaahc You might want to add this to color-eyre as well! :)

@yaahc
Copy link
Contributor

@yaahc yaahc commented on 390e22b Aug 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!, tyty

Please sign in to comment.