rust/src/libstd
Alex Crichton d1040fe329 std: Depend on backtrace crate from crates.io
This commit removes all in-tree support for generating backtraces in
favor of depending on the `backtrace` crate on crates.io. This resolves
a very longstanding piece of duplication where the standard library has
long contained the ability to generate a backtrace on panics, but the
code was later extracted and duplicated on crates.io with the
`backtrace` crate. Since that fork each implementation has seen various
improvements one way or another, but typically `backtrace`-the-crate has
lagged behind libstd in one way or another.

The goal here is to remove this duplication of a fairly critical piece
of code and ensure that there's only one source of truth for generating
backtraces between the standard library and the crate on crates.io.
Recently I've been working to bring the `backtrace` crate on crates.io
up to speed with the support in the standard library which includes:

* Support for `StackWalkEx` on MSVC to recover inline frames with
  debuginfo.
* Using `libbacktrace` by default on MinGW targets.
* Supporting `libbacktrace` on OSX as an option.
* Ensuring all the requisite support in `backtrace`-the-crate compiles
  with `#![no_std]`.
* Updating the `libbacktrace` implementation in `backtrace`-the-crate to
  initialize the global state with the correct filename where necessary.

After reviewing the code in libstd the `backtrace` crate should be at
exact feature parity with libstd today. The backtraces generated should
have the same symbols and same number of frames in general, and there's
not known divergence from libstd currently.

Note that one major difference between libstd's backtrace support and
the `backtrace` crate is that on OSX the crates.io crate enables the
`coresymbolication` feature by default. This feature, however, uses
private internal APIs that aren't published for OSX. While they provide
more accurate backtraces this isn't appropriate for libstd distributed
as a binary, so libstd's dependency on the `backtrace` crate explicitly
disables this feature and forces OSX to use `libbacktrace` as a
symbolication strategy.

The long-term goal of this refactoring is to eventually move us towards
a world where we can drop `libbacktrace` entirely and simply use Gimli
and the surrounding crates for backtrace support. That's still aways off
but hopefully will much more easily enabled by having the source of
truth for backtraces live in crates.io!

Procedurally if we go forward with this I'd like to transfer the
`backtrace-rs` crate to the rust-lang GitHub organization as well, but I
figured I'd hold off on that until we get closer to merging.
2019-05-25 17:09:45 -07:00
..
collections Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPC 2019-05-20 23:02:59 +02:00
ffi Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPC 2019-05-20 23:02:59 +02:00
io Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPC 2019-05-20 23:02:59 +02:00
net Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPC 2019-05-20 23:02:59 +02:00
os Remove bitrig support from rust 2019-05-13 11:09:06 +02:00
prelude libstd => 2018 2019-02-28 04:06:15 +09:00
sync Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPC 2019-05-20 23:02:59 +02:00
sys std: Depend on backtrace crate from crates.io 2019-05-25 17:09:45 -07:00
sys_common std: Depend on backtrace crate from crates.io 2019-05-25 17:09:45 -07:00
tests libstd => 2018 2019-02-28 04:06:15 +09:00
thread Fix intra-doc link resolution failure on re-exporting libstd 2019-05-04 23:48:57 +09:00
alloc.rs Fix intra-doc link resolution failure on re-exporting libstd 2019-05-04 23:48:57 +09:00
ascii.rs Remove licenses 2018-12-25 21:08:33 -07:00
build.rs Remove bitrig support from rust 2019-05-13 11:09:06 +02:00
Cargo.toml std: Depend on backtrace crate from crates.io 2019-05-25 17:09:45 -07:00
env.rs Fix typo "spit_paths", add link 2019-05-23 19:38:23 -06:00
error.rs Rollup merge of #60511 - taiki-e:libstd-intra-doc, r=Dylan-DPC 2019-05-20 23:02:59 +02:00
f32.rs Change copytest parameter name from y to sign 2019-04-05 20:30:45 -06:00
f64.rs Change copytest parameter name from y to sign 2019-04-05 20:30:45 -06:00
fs.rs Fix intra-doc link resolution failure on re-exporting libstd 2019-05-04 23:48:57 +09:00
future.rs Stabilize futures_api 2019-04-23 16:13:53 -07:00
keyword_docs.rs Add all keywords to keyword docs 2019-05-16 14:46:33 -07:00
lib.rs stabilize core parts of MaybeUninit and deprecate mem::uninitialized in the future 2019-05-20 10:44:02 +02:00
macros.rs Remove the unstable and deprecated mpsc_select 2019-05-17 12:16:52 -07:00
memchr.rs libstd => 2018 2019-02-28 04:06:15 +09:00
num.rs Reexport IntErrorKind in std 2019-04-23 00:15:43 +02:00
panic.rs Stabilize futures_api 2019-04-23 16:13:53 -07:00
panicking.rs libstd: deny(elided_lifetimes_in_paths) 2019-03-31 12:56:51 +02:00
path.rs Revert "Add implementations of last in terms of next_back on a bunch of DoubleEndedIterators." 2019-05-22 14:09:34 -07:00
primitive_docs.rs Correct code points to match their textual description 2019-05-04 07:44:30 +02:00
process.rs doc: Warn about possible zombie apocalypse 2019-05-01 17:46:30 +02:00
rt.rs libstd => 2018 2019-02-28 04:06:15 +09:00
time.rs libstd: deny(elided_lifetimes_in_paths) 2019-03-31 12:56:51 +02:00