Description
I was trying to build https://github.com/bvinc/gxi which pulls in pango 0.1.3 as dependency https://github.com/gtk-rs/pango .
While building pango, rustc segfaults
cd /tmp/
cargo new pango_crash --bin
cd pango_crash
echo "pango = \"0.1.3\"" >> Cargo.toml
RUST_BACKTRACE=1 cargo build --verbose
Compiling pango v0.1.3
Running `rustc --crate-name pango /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/pango-0.1.3/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=79ef8578d5682787 -C extra-filename=-79ef8578d5682787 --out-dir /tmp/pango_crash/target/debug/deps -L dependency=/tmp/pango_crash/target/debug/deps --extern libc=/tmp/pango_crash/target/debug/deps/liblibc-a4fb9588d5f009f2.rlib --extern glib=/tmp/pango_crash/target/debug/deps/libglib-b20a4586cffe6411.rlib --extern pango_sys=/tmp/pango_crash/target/debug/deps/libpango_sys-954f223c59579c4f.rlib --extern bitflags=/tmp/pango_crash/target/debug/deps/libbitflags-ace94e42abe55a1c.rlib --cap-lints allow -L native=/usr/lib -L native=/usr/lib -L native=/usr/lib`
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:335:21
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: std::panicking::default_hook::{{closure}}
at libstd/panicking.rs:207
3: std::panicking::default_hook
at libstd/panicking.rs:223
4: core::ops::function::Fn::call
5: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:403
6: std::panicking::begin_panic_fmt
at libstd/panicking.rs:349
7: rust_begin_unwind
at libstd/panicking.rs:325
8: core::panicking::panic_fmt
at libcore/panicking.rs:72
9: core::panicking::panic
at libcore/panicking.rs:51
10: rustc_mir::hair::pattern::PatternContext::const_to_pat
11: rustc_mir::hair::pattern::PatternContext::lower_path
12: rustc_mir::hair::pattern::PatternContext::lower_pattern
13: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once
14: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
15: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
16: <rustc_mir::hair::pattern::check_match::MatchVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr
17: <rustc_mir::hair::pattern::check_match::MatchVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr
18: rustc::session::Session::track_errors
19: rustc_mir::hair::pattern::check_match::check_match
20: rustc::dep_graph::graph::DepGraph::with_task_impl
21: rustc_errors::Handler::track_diagnostics
22: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
23: rustc::ty::maps::<impl rustc::ty::maps::queries::check_match<'tcx>>::force
24: rustc::ty::maps::<impl rustc::ty::maps::queries::check_match<'tcx>>::try_get
25: rustc::ty::maps::TyCtxtAt::check_match
26: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::check_match
27: rustc::hir::intravisit::Visitor::visit_nested_body
28: rustc::hir::Crate::visit_all_item_likes
29: rustc_mir::hair::pattern::check_match::check_crate
30: <std::thread::local::LocalKey<T>>::with
31: <std::thread::local::LocalKey<T>>::with
32: rustc::ty::context::TyCtxt::create_and_enter
33: rustc_driver::driver::compile_input
34: rustc_driver::run_compiler_impl
35: syntax::with_globals
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.26.0-nightly (5508b2714 2018-03-18) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `pango`.
Caused by:
process didn't exit successfully: `rustc --crate-name pango /home/matthias/.cargo/registry/src/github.com-1ecc6299db9ec823/pango-0.1.3/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=79ef8578d5682787 -C extra-filename=-79ef8578d5682787 --out-dir /tmp/pango_crash/target/debug/deps -L dependency=/tmp/pango_crash/target/debug/deps --extern libc=/tmp/pango_crash/target/debug/deps/liblibc-a4fb9588d5f009f2.rlib --extern glib=/tmp/pango_crash/target/debug/deps/libglib-b20a4586cffe6411.rlib --extern pango_sys=/tmp/pango_crash/target/debug/deps/libpango_sys-954f223c59579c4f.rlib --extern bitflags=/tmp/pango_crash/target/debug/deps/libbitflags-ace94e42abe55a1c.rlib --cap-lints allow -L native=/usr/lib -L native=/usr/lib -L native=/usr/lib` (exit code: 101)
meta:
rustc 1.26.0-nightly (5508b2714 2018-03-18)
binary: rustc
commit-hash: 5508b27145cfb82896ae838e6aca0cd48750796f
commit-date: 2018-03-18
host: x86_64-unknown-linux-gnu
release: 1.26.0-nightly
LLVM version: 6.0