Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE whilst compiling bincode: rustc_infer/src/infer/outlives/env.rs:145:26: add_outlives_bounds: unexpected regions #109233

Closed
Manishearth opened this issue Mar 16, 2023 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Manishearth
Copy link
Member

Code

Run cargo check on bincode@1.3.3.

Meta

rustc --version --verbose:

$ rustc +nightly --version --verbose
rustc 1.70.0-nightly (ab654863c 2023-03-15)
binary: rustc
commit-hash: ab654863c3d50482f260cf862647f1fe0ff5e010
commit-date: 2023-03-15
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 15.0.7

Error output

    Checking bincode v1.3.3 (/home/manishearth/sand/bar/bincode)
error: internal compiler error: /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/compiler/rustc_infer/src/infer/outlives/env.rs:145:26: add_outlives_bounds: unexpected regions


[backtrace below]

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.70.0-nightly (ab654863c 2023-03-15) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [check_mod_item_types] checking item types in module `de`
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `bincode` (lib)

Backtrace

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/compiler/rustc_errors/src/lib.rs:1644:9
stack backtrace:
   0:     0x7fb856f6750a - std::backtrace_rs::backtrace::libunwind::trace::hca5b94e57c77ccf5
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb856f6750a - std::backtrace_rs::backtrace::trace_unsynchronized::h5b5fce74d82f8778
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb856f6750a - std::sys_common::backtrace::_print_fmt::ha47e7aaa1d2225ec
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fb856f6750a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1aaba92be89501b
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fb856fcab3e - core::fmt::write::h750a8e721825859f
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/core/src/fmt/mod.rs:1232:17
   5:     0x7fb856f5a375 - std::io::Write::write_fmt::hbf6015e32697f7ba
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/io/mod.rs:1684:15
   6:     0x7fb856f672d5 - std::sys_common::backtrace::_print::h301c6b6cac7c0a3a
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fb856f672d5 - std::sys_common::backtrace::print::h7f921f37b0542aab
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fb856f6a04f - std::panicking::default_hook::{{closure}}::ha1e8e5c596b5be71
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:271:22
   9:     0x7fb856f69d8b - std::panicking::default_hook::hb0497d64ba7aeb9b
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:290:9
  10:     0x7fb85a265475 - rustc_driver_impl[190cb2184ae08abb]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fb856f6a88d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h5fe0c368b54c8ed7
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:2002:9
  12:     0x7fb856f6a88d - std::panicking::rust_panic_with_hook::hde905c542c1ea61a
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:696:13
  13:     0x7fb85a7ca161 - std[75e4c6f671155ce4]::panicking::begin_panic::<rustc_errors[bdf389fe3f70d25b]::ExplicitBug>::{closure#0}
  14:     0x7fb85a7c5876 - std[75e4c6f671155ce4]::sys_common::backtrace::__rust_end_short_backtrace::<std[75e4c6f671155ce4]::panicking::begin_panic<rustc_errors[bdf389fe3f70d25b]::ExplicitBug>::{closure#0}, !>
  15:     0x7fb85a7c26e6 - std[75e4c6f671155ce4]::panicking::begin_panic::<rustc_errors[bdf389fe3f70d25b]::ExplicitBug>
  16:     0x7fb85a817606 - std[75e4c6f671155ce4]::panic::panic_any::<rustc_errors[bdf389fe3f70d25b]::ExplicitBug>
  17:     0x7fb85a813e26 - <rustc_errors[bdf389fe3f70d25b]::HandlerInner>::bug::<&alloc[dd66e831cb8c4684]::string::String>
  18:     0x7fb85a813af0 - <rustc_errors[bdf389fe3f70d25b]::Handler>::bug::<&alloc[dd66e831cb8c4684]::string::String>
  19:     0x7fb85a7fff9b - rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::opt_span_bug_fmt::<rustc_span[e39f9d1da20fb520]::span_encoding::Span>::{closure#0}
  20:     0x7fb85a7fe8ea - rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::tls::with_opt::<rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::opt_span_bug_fmt<rustc_span[e39f9d1da20fb520]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7fb85a7fe8b6 - rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::tls::with_context_opt::<rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::tls::with_opt<rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::opt_span_bug_fmt<rustc_span[e39f9d1da20fb520]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7fb85a7ffee6 - rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::opt_span_bug_fmt::<rustc_span[e39f9d1da20fb520]::span_encoding::Span>
  23:     0x7fb8588c34b3 - rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::bug_fmt
  24:     0x7fb858a80b45 - <rustc_infer[4cb97a789990ae8c]::infer::outlives::env::OutlivesEnvironment>::with_bounds::<core[86d79cd3dd753e85]::iter::adapters::flatten::Flatten<core[86d79cd3dd753e85]::iter::adapters::map::Map<indexmap[6bbb46ee84024ff5]::set::IntoIter<rustc_middle[d8dcb3e1f9b6a1d3]::ty::Ty>, <rustc_infer[4cb97a789990ae8c]::infer::InferCtxt as rustc_trait_selection[834a42ea12cf8990]::traits::outlives_bounds::InferCtxtExt>::implied_bounds_tys::{closure#0}>>>
  25:     0x7fb858d7d580 - rustc_hir_analysis[60e36e2803dc18bc]::check::compare_impl_item::compare_method_predicate_entailment
  26:     0x7fb858d776bb - rustc_hir_analysis[60e36e2803dc18bc]::check::compare_impl_item::compare_impl_method
  27:     0x7fb858d6ff1c - rustc_hir_analysis[60e36e2803dc18bc]::check::check::check_impl_items_against_trait
  28:     0x7fb858d672b8 - rustc_hir_analysis[60e36e2803dc18bc]::check::check::check_mod_item_types
  29:     0x7fb85989856f - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query::<rustc_query_impl[9c3c364151da071f]::queries::check_mod_item_types, rustc_query_impl[9c3c364151da071f]::plumbing::QueryCtxt>
  30:     0x7fb859897e43 - <rustc_query_impl[9c3c364151da071f]::Queries as rustc_middle[d8dcb3e1f9b6a1d3]::ty::query::QueryEngine>::check_mod_item_types
  31:     0x7fb85990927c - <rustc_middle[d8dcb3e1f9b6a1d3]::hir::map::Map>::for_each_module::<rustc_hir_analysis[60e36e2803dc18bc]::check_crate::{closure#6}::{closure#0}>
  32:     0x7fb85846e6b8 - rustc_hir_analysis[60e36e2803dc18bc]::check_crate
  33:     0x7fb858465d25 - rustc_interface[c60781b202b529bb]::passes::analysis
  34:     0x7fb859a73dbd - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query::<rustc_query_impl[9c3c364151da071f]::queries::analysis, rustc_query_impl[9c3c364151da071f]::plumbing::QueryCtxt>
  35:     0x7fb859a73890 - <rustc_query_impl[9c3c364151da071f]::Queries as rustc_middle[d8dcb3e1f9b6a1d3]::ty::query::QueryEngine>::analysis
  36:     0x7fb85989d899 - <rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>
  37:     0x7fb859429dc8 - rustc_span[e39f9d1da20fb520]::with_source_map::<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  38:     0x7fb8594218e0 - <scoped_tls[3baa4ec3dd04ff72]::ScopedKey<rustc_span[e39f9d1da20fb520]::SessionGlobals>>::set::<rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>
  39:     0x7fb859420fc2 - std[75e4c6f671155ce4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c60781b202b529bb]::util::run_in_thread_pool_with_globals<rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>
  40:     0x7fb859420d6a - <<std[75e4c6f671155ce4]::thread::Builder>::spawn_unchecked_<rustc_interface[c60781b202b529bb]::util::run_in_thread_pool_with_globals<rustc_interface[c60781b202b529bb]::interface::run_compiler<core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>>::{closure#1} as core[86d79cd3dd753e85]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  41:     0x7fb856f74783 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3341c80cf784afb0
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:1988:9
  42:     0x7fb856f74783 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a4397435c8c4587
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:1988:9
  43:     0x7fb856f74783 - std::sys::unix::thread::Thread::new::thread_start::h4d87276efd9893f6
                               at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys/unix/thread.rs:108:17
  44:     0x7fb856d0ffd4 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  45:     0x7fb856d9066c - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  46:                0x0 - <unknown>

@Manishearth Manishearth added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 16, 2023
@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 16, 2023

This is already fixed on the master toolchain (see pinned ticket #109199 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants