Skip to content

Instantly share code, notes, and snippets.

@bsodmike
Created October 10, 2021 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsodmike/c4f3beaef5c1f3f6f98443d8d175514b to your computer and use it in GitHub Desktop.
Save bsodmike/c4f3beaef5c1f3f6f98443d8d175514b to your computer and use it in GitHub Desktop.
Rust library alloc test failure (against master)
Error whilst running `./x.py test --keep-stage 1 library/alloc/`
```rust
Updating only changed submodules
Submodules updated in 0.01 seconds
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Testing alloc stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 265 tests
.................................................................................................... 100/265
.................................................................................................... 200/265
.................................................................
test result: ok. 265 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.15s
running 663 tests
.................................................................................................... 100/663
.................................................................................................... 200/663
.................................................................................................... 300/663
.................................................................................................... 400/663
.................................................................................................... 500/663
.................................................................................................... 600/663
...............................................................
test result: ok. 663 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.45s
running 441 tests
.................................................................................................... 100/441
.................................................................................................... 200/441
.................................................................................................... 300/441
.................................................................................................... 400/441
.........................................
test result: ok. 441 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.41s
running 599 tests
.................................................................................................... 100/599
.................................................................................................... 200/599
..................................i................................................................. 300/599
.................................................................................................... 400/599
...................................F................................................................ 500/599
...................................................................................................
failures:
---- src/string.rs - string::String (line 168) stdout ----
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs:696:81
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.56.0-beta.1 (e784c962e 2021-09-07) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z force-unstable-if-unmarked -C codegen-units=1 -C embed-bitcode=no --crate-type bin
query stack during panic:
#0 [typeck] type-checking `main::_doctest_main_src_string_rs_168_0`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: internal compiler error: trimmed_def_paths constructed
 |
 = note: delayed at 0: rustc_errors::Handler::delay_good_path_bug
 1: rustc_middle::ty::print::pretty::trimmed_def_paths
 2: rustc_data_structures::stack::ensure_sufficient_stack
 3: rustc_query_system::query::plumbing::get_query_impl
 4: rustc_query_system::query::plumbing::get_query
 5: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
 6: rustc_middle::ty::print::pretty::PrettyPrinter::pretty_print_type
 7: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::sty::TypeAndMut>::print
 8: rustc_middle::ty::print::pretty::PrettyPrinter::pretty_print_type
 9: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::TraitPredicate>::print
 10: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::PredicateKind>::print
 11: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder
 12: rustc_middle::ty::print::pretty::<impl core::fmt::Display for rustc_middle::ty::Predicate>::fmt
 13: core::fmt::write
 at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/core/src/fmt/mod.rs:1150:17
 14: core::fmt::Write::write_fmt
 at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/core/src/fmt/mod.rs:186:9
 15: alloc::fmt::format
 at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/fmt.rs:583:5
 16: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
 17: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
 18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
 19: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
 20: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
 21: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
 22: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
 23: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
 24: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
 25: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
 26: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
 27: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
 28: rustc_typeck::check::check::check_fn
 29: rustc_infer::infer::InferCtxtBuilder::enter
 30: rustc_typeck::check::typeck
 31: rustc_query_system::query::plumbing::get_query_impl
 32: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
 33: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
 34: rustc_typeck::check::typeck_item_bodies
 35: rustc_query_system::query::plumbing::get_query_impl
 36: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
 37: rustc_session::utils::<impl rustc_session::session::Session>::time
 38: rustc_typeck::check_crate
 39: rustc_interface::passes::analysis
 40: rustc_query_system::query::plumbing::get_query_impl
 41: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
 42: rustc_interface::passes::QueryContext::enter
 43: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
 44: rustc_span::with_source_map
 45: scoped_tls::ScopedKey<T>::set
 46: std::sys_common::backtrace::__rust_begin_short_backtrace
 47: core::ops::function::FnOnce::call_once{{vtable.shim}}
 48: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
 at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
 49: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
 at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
 50: std::sys::unix::thread::Thread::new::thread_start
 at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys/unix/thread.rs:106:17
 51: start_thread
 52: __clone
 
thread 'rustc' panicked at 'no warnings or errors encountered even though `delayed_good_path_bugs` issued', compiler/rustc_errors/src/lib.rs:1166:13
stack backtrace:
0: 0x7f32db40c4fc - std::backtrace_rs::backtrace::libunwind::trace::h51faa62df48810e4
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x7f32db40c4fc - std::backtrace_rs::backtrace::trace_unsynchronized::h91de4d8e16d607e4
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f32db40c4fc - std::sys_common::backtrace::_print_fmt::h71b0935f97e4322c
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7f32db40c4fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9a78218788c14e18
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:46:22
4: 0x7f32db46a20c - core::fmt::write::h3381b3176fe2b3d3
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/core/src/fmt/mod.rs:1150:17
5: 0x7f32db3fd435 - std::io::Write::write_fmt::h1d5220480c7a2437
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/io/mod.rs:1667:15
6: 0x7f32db40fa60 - std::sys_common::backtrace::_print::h4b77abc4d907ed0e
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:49:5
7: 0x7f32db40fa60 - std::sys_common::backtrace::print::hb170c60b542377ad
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:36:9
8: 0x7f32db40fa60 - std::panicking::default_hook::{{closure}}::h12bbda9af8901ee3
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:210:50
9: 0x7f32db40f617 - std::panicking::default_hook::h8c6c66d3f3ba6768
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:227:9
10: 0x7f32dbbe3861 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h5d5f6bcd40777e95
11: 0x7f32db410279 - std::panicking::rust_panic_with_hook::h36f2fa0bb09f4069
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:628:17
12: 0x7f32db40fd30 - std::panicking::begin_panic_handler::{{closure}}::h9c42b65a42d06a7a
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:521:13
13: 0x7f32db40c9c4 - std::sys_common::backtrace::__rust_end_short_backtrace::hc791bddfe31e532c
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:141:18
14: 0x7f32db40fc99 - rust_begin_unwind
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:517:5
15: 0x7f32db3d481b - std::panicking::begin_panic_fmt::h32ac317c038a272d
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:460:5
16: 0x7f32de14054e - rustc_errors::HandlerInner::flush_delayed::hc1a0dc2a3b52b7c5
17: 0x7f32de13ee41 - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::h6b6fa9db3b176321
18: 0x7f32dd702b16 - core::ptr::drop_in_place<rustc_session::parse::ParseSess>::h0f64c3a6d9ae48b4
19: 0x7f32dd704b0e - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::h38ccacfabbb0cd9a
20: 0x7f32dd6d6a8d - core::ptr::drop_in_place<rustc_interface::interface::Compiler>::he462bcfe0a585c06
21: 0x7f32dd6d676c - rustc_span::with_source_map::h42000c6d4d4801a0
22: 0x7f32dd6e8858 - scoped_tls::ScopedKey<T>::set::h9c4e59a22d2be862
23: 0x7f32dd6d79db - std::sys_common::backtrace::__rust_begin_short_backtrace::hb112af792d752f1d
24: 0x7f32dd6d4b95 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h9bf5ff18e54ee278
25: 0x7f32db41c8c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hbbbb32ef11ea0ad2
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
26: 0x7f32db41c8c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3b8ef23699fc5385
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
27: 0x7f32db41c8c3 - std::sys::unix::thread::Thread::new::thread_start::ha57f5cba35f709b7
at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys/unix/thread.rs:106:17
28: 0x7f32db33d299 - start_thread
29: 0x7f32db251353 - __clone
30: 0x0 - <unknown>
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.56.0-beta.1 (e784c962e 2021-09-07) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z force-unstable-if-unmarked -C codegen-units=1 -C embed-bitcode=no --crate-type bin
query stack during panic:
end of query stack
thread panicked while panicking. aborting.
Some expected error codes were not found: ["E0277"]
failures:
src/string.rs - string::String (line 168)
test result: FAILED. 597 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 11.59s
command did not execute successfully: "/opt/code/rust-projects/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "32" "--release" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/opt/code/rust-projects/rust/library/test/Cargo.toml" "-p" "alloc" "--" "--quiet"
expected success, got: exit status: 101
Build completed unsuccessfully in 0:00:13
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment