about summary refs log tree commit diff
path: root/src/libstd/thread/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-10 11:37:22 +0000
committerbors <bors@rust-lang.org>2017-05-10 11:37:22 +0000
commit25a161765fb90f2bfc78bda8fef944048e72bd26 (patch)
tree0dc21722451293bbedf2367b1fea0fa06c112bb7 /src/libstd/thread/mod.rs
parent2b97174ada7fb1854269558ed2cf3b089e58beee (diff)
parentca8b75466cef854d30fdf7614c2358b1eb46816e (diff)
downloadrust-25a161765fb90f2bfc78bda8fef944048e72bd26.tar.gz
rust-25a161765fb90f2bfc78bda8fef944048e72bd26.zip
Auto merge of #41815 - Yamakaky:improve-backtrace-bottom, r=alexcrichton
Improve cleaning of the bottom of the backtrace

Following https://github.com/rust-lang/rust/pull/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_before` since it will be used later for the cleaning of the top.
Diffstat (limited to 'src/libstd/thread/mod.rs')
-rw-r--r--src/libstd/thread/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 1bb0d9f3bab..4432f898e04 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -365,7 +365,9 @@ impl Builder {
             }
             unsafe {
                 thread_info::set(imp::guard::current(), their_thread);
-                let try_result = panic::catch_unwind(panic::AssertUnwindSafe(f));
+                let try_result = panic::catch_unwind(panic::AssertUnwindSafe(|| {
+                    ::sys_common::backtrace::__rust_begin_short_backtrace(f)
+                }));
                 *their_packet.get() = Some(try_result);
             }
         };