Skip to content

Commit

Permalink
Attempt to fix backtrace tests on i686-msvc
Browse files Browse the repository at this point in the history
Some fixes for i686-msvc and Windows have landed on the `backtrace`
crate but hadn't made their way here yet. Let's update that and see if
it passes CI.
  • Loading branch information
alexcrichton committed Jul 31, 2019
1 parent 9152fe4 commit 3d2b6e7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
25 changes: 9 additions & 16 deletions Cargo.lock
Expand Up @@ -97,18 +97,12 @@ dependencies = [
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "autocfg"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "backtrace"
version = "0.3.29"
version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace-sys 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
Expand All @@ -118,7 +112,7 @@ dependencies = [

[[package]]
name = "backtrace-sys"
version = "0.1.27"
version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -864,7 +858,7 @@ name = "error-chain"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.29 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
Expand All @@ -879,7 +873,7 @@ name = "failure"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.29 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

Expand Down Expand Up @@ -2511,7 +2505,7 @@ name = "rustc"
version = "0.0.0"
dependencies = [
"arena 0.0.0",
"backtrace 0.3.29 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"chalk-engine 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -3457,7 +3451,7 @@ name = "std"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"backtrace 0.3.29 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -4275,9 +4269,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef"
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
"checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf"
"checksum backtrace 0.3.29 (registry+https://github.com/rust-lang/crates.io-index)" = "2d631cd7af21b7ff796293f1990104e3cdb606852863bac32f000c193aa35dfb"
"checksum backtrace-sys 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)" = "6ea90dd7b012b3d1a2cb6bec16670a0db2c95d4e931e84f4047e0460c1b34c8d"
"checksum backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)" = "b5164d292487f037ece34ec0de2fcede2faa162f085dd96d2385ab81b12765ba"
"checksum backtrace-sys 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "5b3a000b9c543553af61bc01cbfc403b04b5caa9e421033866f2e98061eb3e61"
"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd"
"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/Cargo.toml
Expand Up @@ -26,7 +26,7 @@ unwind = { path = "../libunwind" }
hashbrown = { version = "0.4.0", features = ['rustc-dep-of-std'] }

[dependencies.backtrace]
version = "0.3.29"
version = "0.3.34"
default-features = false # don't use coresymbolication on OSX
features = [
"rustc-dep-of-std", # enable build support for integrating into libstd
Expand Down
16 changes: 15 additions & 1 deletion src/test/ui/backtrace-debuginfo.rs
Expand Up @@ -11,7 +11,6 @@
// ignore-pretty issue #37195
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported
// ignore-msvc issue #62844
// ignore-sgx no processes
// normalize-stderr-test ".*\n" -> ""

Expand All @@ -31,8 +30,23 @@ macro_rules! dump_and_die {
($($pos:expr),*) => ({
// FIXME(#18285): we cannot include the current position because
// the macro span takes over the last frame's file/line.
//
// You might also be wondering why a major platform,
// i686-pc-windows-msvc, is located in here. Some of the saga can be
// found on #62897, but the tl;dr; is that it appears that if the
// standard library doesn't have debug information or frame pointers,
// which it doesn't by default on the test builders, then the stack
// walking routines in dbghelp will randomly terminate the stack trace
// in libstd without going further. Presumably the addition of frame
// pointers and/or debuginfo fixes this since tests always work with
// nightly compilers (which have debuginfo). In general though this test
// is replicated in rust-lang/backtrace-rs and has extensive coverage
// there, even on i686-pc-windows-msvc. We do the best we can in
// rust-lang/rust to test it as well, but sometimes we just gotta keep
// landing PRs.
if cfg!(any(target_os = "android",
all(target_os = "linux", target_arch = "arm"),
all(target_env = "msvc", target_arch = "x86"),
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd")) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/backtrace.rs
Expand Up @@ -3,8 +3,8 @@
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported
// ignore-openbsd no support for libbacktrace without filename
// ignore-msvc issue #62844
// ignore-sgx no processes
// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test
// compile-flags:-g

use std::env;
Expand Down

0 comments on commit 3d2b6e7

Please sign in to comment.