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

add_outlives_bounds: unexpected regions compiling bincode v1.3.3 #109223

Closed
jwbowen opened this issue Mar 16, 2023 · 3 comments
Closed

add_outlives_bounds: unexpected regions compiling bincode v1.3.3 #109223

jwbowen opened this issue Mar 16, 2023 · 3 comments
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

@jwbowen
Copy link

jwbowen commented Mar 16, 2023

I hit this while trying to compile jaq on a VM recently updated to Fedora 38 Beta; the error is in the bincode library, version 1.3.3. I'm able to reproduce it just trying to build that version of the crate in a "clean" checkout of the repo.

Code

I'm honestly not sure what part of the code is triggering the error, but it's easily reproducible just by checking out the repo and building it, with or without --release.

git clone https://github.com/bincode-org/bincode.git
cd bincode
git checkout v1.3.3
cargo build

Meta

rustc --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

error: internal compiler error: /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/compiler/rustc_infer/src/infer/outlives/env.rs:145:26: add_outlives_bounds: unexpected regions
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 debug-assertions=off -C codegen-units=1 -C opt-level=3 -C target-cpu=native
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
Backtrace

``` thread 'rustc' panicked at 'Box', /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/compiler/rustc_errors/src/lib.rs:1644:9 stack backtrace: 0: 0x7fb9ac96750a - std::backtrace_rs::backtrace::libunwind::trace::hca5b94e57c77ccf5 at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7fb9ac96750a - std::backtrace_rs::backtrace::trace_unsynchronized::h5b5fce74d82f8778 at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7fb9ac96750a - std::sys_common::backtrace::_print_fmt::ha47e7aaa1d2225ec at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7fb9ac96750a - ::fmt::ha1aaba92be89501b at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7fb9ac9cab3e - core::fmt::write::h750a8e721825859f at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/core/src/fmt/mod.rs:1232:17 5: 0x7fb9ac95a375 - std::io::Write::write_fmt::hbf6015e32697f7ba at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/io/mod.rs:1684:15 6: 0x7fb9ac9672d5 - std::sys_common::backtrace::_print::h301c6b6cac7c0a3a at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7fb9ac9672d5 - std::sys_common::backtrace::print::h7f921f37b0542aab at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7fb9ac96a04f - std::panicking::default_hook::{{closure}}::ha1e8e5c596b5be71 at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:271:22 9: 0x7fb9ac969d8b - std::panicking::default_hook::hb0497d64ba7aeb9b at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:290:9 10: 0x7fb9afc65475 - rustc_driver_impl[190cb2184ae08abb]::DEFAULT_HOOK::{closure#0}::{closure#0} 11: 0x7fb9ac96a88d - as core::ops::function::Fn>::call::h5fe0c368b54c8ed7 at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:2002:9 12: 0x7fb9ac96a88d - std::panicking::rust_panic_with_hook::hde905c542c1ea61a at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/panicking.rs:696:13 13: 0x7fb9b01ca161 - std[75e4c6f671155ce4]::panicking::begin_panic::::{closure#0} 14: 0x7fb9b01c5876 - std[75e4c6f671155ce4]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !> 15: 0x7fb9b01c26e6 - std[75e4c6f671155ce4]::panicking::begin_panic:: 16: 0x7fb9b0217606 - std[75e4c6f671155ce4]::panic::panic_any:: 17: 0x7fb9b0213e26 - ::bug::<&alloc[dd66e831cb8c4684]::string::String> 18: 0x7fb9b0213af0 - ::bug::<&alloc[dd66e831cb8c4684]::string::String> 19: 0x7fb9b01fff9b - rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::opt_span_bug_fmt::::{closure#0} 20: 0x7fb9b01fe8ea - rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0} 21: 0x7fb9b01fe8b6 - rustc_middle[d8dcb3e1f9b6a1d3]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !> 22: 0x7fb9b01ffee6 - rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::opt_span_bug_fmt:: 23: 0x7fb9ae2c34b3 - rustc_middle[d8dcb3e1f9b6a1d3]::util::bug::bug_fmt 24: 0x7fb9ae480b45 - ::with_bounds::, ::implied_bounds_tys::{closure#0}>>> 25: 0x7fb9ae77d580 - rustc_hir_analysis[60e36e2803dc18bc]::check::compare_impl_item::compare_method_predicate_entailment 26: 0x7fb9ae7776bb - rustc_hir_analysis[60e36e2803dc18bc]::check::compare_impl_item::compare_impl_method 27: 0x7fb9ae76ff1c - rustc_hir_analysis[60e36e2803dc18bc]::check::check::check_impl_items_against_trait 28: 0x7fb9ae7672b8 - rustc_hir_analysis[60e36e2803dc18bc]::check::check::check_mod_item_types 29: 0x7fb9af2982be - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query:: 30: 0x7fb9af297e43 - ::check_mod_item_types 31: 0x7fb9af30927c - ::for_each_module:: 32: 0x7fb9ade6e6b8 - rustc_hir_analysis[60e36e2803dc18bc]::check_crate 33: 0x7fb9ade65d25 - rustc_interface[c60781b202b529bb]::passes::analysis 34: 0x7fb9af473b9c - rustc_query_system[1a66d6a5882ef44d]::query::plumbing::try_execute_query:: 35: 0x7fb9af473890 - ::analysis 36: 0x7fb9af29d899 - ::enter::> 37: 0x7fb9aee29dc8 - rustc_span[e39f9d1da20fb520]::with_source_map::, rustc_interface[c60781b202b529bb]::interface::run_compiler, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> 38: 0x7fb9aee218e0 - >::set::, rustc_driver_impl[190cb2184ae08abb]::run_compiler::{closure#1}>::{closure#0}, core[86d79cd3dd753e85]::result::Result<(), rustc_span[e39f9d1da20fb520]::ErrorGuaranteed>> 39: 0x7fb9aee20fc2 - std[75e4c6f671155ce4]::sys_common::backtrace::__rust_begin_short_backtrace::, 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: 0x7fb9aee20d6a - <::spawn_unchecked_, 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: 0x7fb9ac974783 - as core::ops::function::FnOnce>::call_once::h3341c80cf784afb0 at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:1988:9 42: 0x7fb9ac974783 - as core::ops::function::FnOnce>::call_once::h6a4397435c8c4587 at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/alloc/src/boxed.rs:1988:9 43: 0x7fb9ac974783 - std::sys::unix::thread::Thread::new::thread_start::h4d87276efd9893f6 at /rustc/ab654863c3d50482f260cf862647f1fe0ff5e010/library/std/src/sys/unix/thread.rs:108:17 44: 0x7fb9ac715c57 - start_thread 45: 0x7fb9ac79ba70 - __clone3 46: 0x0 -

</p>
</details>
@jwbowen jwbowen added 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. labels Mar 16, 2023
@lqd
Copy link
Member

lqd commented Mar 16, 2023

This is a duplicate of #109199 so I'll close it as such. This has already been fixed on master, but too late to appear in today's nightly. The fix will be available in tomorrow's nightly though.

Thanks for opening an issue!

@lqd lqd closed this as completed Mar 16, 2023
@jwbowen
Copy link
Author

jwbowen commented Mar 16, 2023

Good to know; apologies for the duplicate!

@lqd
Copy link
Member

lqd commented Mar 16, 2023

No worries at all, it's better to have duplicates than miss regressions.

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