Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove cleaning of the bottom of the backtrace #41815
Conversation
rust-highfive
assigned
brson
May 7, 2017
This comment has been minimized.
This comment has been minimized.
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
rust-highfive
assigned
alexcrichton
and unassigned
brson
May 7, 2017
carols10cents
added
the
S-waiting-on-review
label
May 8, 2017
alexcrichton
reviewed
May 8, 2017
|
Looks good! Could a test be added for this as well? |
| @@ -122,7 +158,7 @@ pub fn log_enabled() -> Option<PrintFormat> { | |||
| } | |||
|
|
|||
| let val = match env::var_os("RUST_BACKTRACE") { | |||
| Some(x) => if &x == "0" { | |||
| Some(x) => if &x == "0" || &x == "" { | |||
This comment has been minimized.
This comment has been minimized.
alexcrichton
May 8, 2017
Member
Perhaps we could hold off on changing the interpretation of RUST_BACKTRACE for now? I'm wary to add more and more cases for positive/negative intepretation.
This comment has been minimized.
This comment has been minimized.
| let _ = resolve_symname(*frame, |symname| { | ||
| if let Some(mangled_symbol_name) = symname { | ||
| // Use grep to find the concerned functions | ||
| if mangled_symbol_name.contains("__rust_begin_short_backtrace") { |
This comment has been minimized.
This comment has been minimized.
alexcrichton
May 8, 2017
Member
This should have a deterministic symbol name, right? Would it be possible to use == here?
This comment has been minimized.
This comment has been minimized.
Yamakaky
May 9, 2017
Author
Contributor
Well, we switched to a polymorphic function so we can't really do that https://github.com/Yamakaky/rust/blob/e995a17b5a7d31641b85fcf414a52c5330fff186/src/libstd/sys_common/backtrace.rs#L133
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Ok looks good to me! Want to squash and I'll r+? |
This comment has been minimized.
This comment has been minimized.
|
Yeay ! |
Yamakaky
force-pushed the
Yamakaky:improve-backtrace-bottom
branch
from
7b41ca0
to
ca8b754
May 9, 2017
This comment has been minimized.
This comment has been minimized.
|
(not really proud of the commit's title ^^) |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
added
the
T-libs
label
May 9, 2017
Yamakaky
referenced this pull request
May 9, 2017
Closed
[minor] replace libtest/lib.rs:FnBox by std::boxed::FnBox #41810
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
May 10, 2017
bors
added a commit
that referenced
this pull request
May 10, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
May 10, 2017
bors
added a commit
that referenced
this pull request
May 10, 2017
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
May 10, 2017
This comment has been minimized.
This comment has been minimized.
|
|
Yamakaky commentedMay 7, 2017
•
edited
Following #40264. It only cleans the bottom of the trace (after the main). It handles correctly the normal main, tests, benchmarks and threads.
I kept
skipped_beforesince it will be used later for the cleaning of the top.