Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()' #296

Open
dario23 opened this issue May 15, 2022 · 0 comments
Labels

Comments

@dario23
Copy link
Contributor

dario23 commented May 15, 2022

encountered this one while debugging.

to reproduce, run e.g. PATH=${PWD}/target/debug:$PATH RUST_BACKTRACE=full cargo run --bin cargo-semver -- -S trust-dns-proto:0.21.0 -C trust-dns-proto:0.21.1.

this leads to the following backtrace

backtrace: thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/sty.rs:1098:9
thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/sty.rs:1098:9
stack backtrace:
   0:     0x7f5fb984d85d - std::backtrace_rs::backtrace::libunwind::trace::hd79e9b51bb0b02a3
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f5fb984d85d - std::backtrace_rs::backtrace::trace_unsynchronized::hc4b2624d11f57391
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f5fb984d85d - std::sys_common::backtrace::_print_fmt::h5b920b6df28041d5
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f5fb984d85d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h01f2db48eea34166
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f5fb98a8efc - core::fmt::write::h743b8fce003c331c
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/fmt/mod.rs:1194:17
   5:     0x7f5fb983f041 - std::io::Write::write_fmt::h55edc38b905db9b5
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/io/mod.rs:1655:15
   6:     0x7f5fb9850575 - std::sys_common::backtrace::_print::h72c54a6b7a86b7bf
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f5fb9850575 - std::sys_common::backtrace::print::h8b541992f5fa33c9
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f5fb9850575 - std::panicking::default_hook::{{closure}}::h47e8a61e5844dea4
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/panicking.rs:295:22
   9:     0x7f5fb98501e9 - std::panicking::default_hook::h65ae1796882c178c
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/panicking.rs:314:9
  10:     0x7f5fb9850c98 - std::panicking::rust_panic_with_hook::h1c3eee211b989bad
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/panicking.rs:698:17
  11:     0x7f5fb9850b09 - std::panicking::begin_panic_handler::{{closure}}::h653627205f5b2cdc
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/panicking.rs:586:13
  12:     0x7f5fb984dd14 - std::sys_common::backtrace::__rust_end_short_backtrace::h36d845a914b6aae7
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x7f5fb9850879 - rust_begin_unwind
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/panicking.rs:584:5
  14:     0x7f5fb9815bd3 - core::panicking::panic_fmt::hb6389d787a80a806
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/panicking.rs:142:14
  15:     0x7f5fb9815a9d - core::panicking::panic::hac9e097b59d15ac2
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/panicking.rs:48:5
  16:     0x562bc1c93eac - rustc_middle::ty::sty::Binder<T>::dummy::hc35695d3676baff3
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/sty.rs:1098:9
  17:     0x562bc1c09366 - semverver::translate::TranslationContext::translate::{{closure}}::{{closure}}::{{closure}}::hc6a8f1bf659feeee
                               at /home/dario/git/rust-semverver/src/translate.rs:217:61
  18:     0x562bc1c942ca - rustc_middle::ty::sty::Binder<T>::map_bound::heb9dd7ae3f8c9f15
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/sty.rs:1159:21
  19:     0x562bc1c07f27 - semverver::translate::TranslationContext::translate::{{closure}}::{{closure}}::h5ac5d64345af5ae7
                               at /home/dario/git/rust-semverver/src/translate.rs:214:33
  20:     0x562bc1be4ec0 - core::iter::adapters::map::map_fold::{{closure}}::h6b51feaca4e154b7
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/iter/adapters/map.rs:84:28
  21:     0x562bc1b7f74b - core::iter::adapters::copied::copy_fold::{{closure}}::hc714b4e8b394e4ff
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/iter/adapters/copied.rs:28:22
  22:     0x562bc1c0bb8a - core::iter::traits::iterator::Iterator::fold::h9f7486ecf315ae85
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/iter/traits/iterator.rs:2366:21
  23:     0x562bc1b7ba55 - <core::iter::adapters::copied::Copied<I> as core::iter::traits::iterator::Iterator>::fold::ha169f444cf8514c8
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/iter/adapters/copied.rs:64:9
  24:     0x562bc1be1e24 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h25dc3993e2da7add
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/iter/adapters/map.rs:124:9
  25:     0x562bc1be378a - core::iter::traits::iterator::Iterator::for_each::hd45773299699416e
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/iter/traits/iterator.rs:783:9
  26:     0x562bc1c57d95 - <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend::h783769f0e9efdddd
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/alloc/src/vec/spec_extend.rs:40:17
  27:     0x562bc1c4fee8 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h4ed792443346ed88
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/alloc/src/vec/spec_from_iter_nested.rs:62:9
  28:     0x562bc1c586ed - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h3f52b7a4f9b775a2
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/alloc/src/vec/spec_from_iter.rs:33:9
  29:     0x562bc1c578e0 - <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter::hfda6628d337bb7e4
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/alloc/src/vec/mod.rs:2610:9
  30:     0x562bc1be32ad - core::iter::traits::iterator::Iterator::collect::h63cc56a05cda0be8
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/core/src/iter/traits/iterator.rs:1788:9
  31:     0x562bc1c0595d - semverver::translate::TranslationContext::translate::{{closure}}::h6c6c2a350a79e1de
                               at /home/dario/git/rust-semverver/src/translate.rs:211:43
  32:     0x562bc1c232dd - <rustc_middle::ty::fold::BottomUpFolder<F,G,H> as rustc_middle::ty::fold::TypeFolder>::fold_ty::hbcf3c3ccb88cc4ef
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:424:9
  33:     0x562bc1c23c44 - <F as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_ty::hf8ef379f4253fe23
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:337:12
  34:     0x562bc1b1ee71 - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::fold::TypeFoldable for rustc_middle::ty::Ty>::try_fold_with::h4501b28e212430f0
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/structural_impls.rs:1020:9
  35:     0x562bc1ca0935 - <rustc_middle::ty::subst::GenericArg as rustc_middle::ty::fold::TypeFoldable>::try_super_fold_with::h54b6bf0441d718e5
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/subst.rs:205:41
  36:     0x562bc1c9f464 - rustc_middle::ty::fold::TypeFoldable::try_fold_with::hf2740bb3001e227e
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:79:9
  37:     0x562bc1c20d0a - rustc_middle::ty::subst::<impl rustc_middle::ty::fold::TypeFoldable for &rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg>>::try_super_fold_with::hbc295fac082fe589
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/subst.rs:444:30
  38:     0x562bc1c1c684 - rustc_middle::ty::fold::TypeFoldable::try_fold_with::hd13bd82c79325588
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:79:9
  39:     0x562bc1b227e5 - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::fold::TypeFoldable for rustc_middle::ty::Ty>::try_super_fold_with::hea27a9e4a4f7dd5c
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/structural_impls.rs:983:50
  40:     0x562bc1b25494 - rustc_middle::ty::fold::TypeFoldable::super_fold_with::hfd4ab988bc211f81
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:102:9
  41:     0x562bc1c232b6 - <rustc_middle::ty::fold::BottomUpFolder<F,G,H> as rustc_middle::ty::fold::TypeFolder>::fold_ty::hbcf3c3ccb88cc4ef
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:423:17
  42:     0x562bc1c23c44 - <F as rustc_middle::ty::fold::FallibleTypeFolder>::try_fold_ty::hf8ef379f4253fe23
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:337:12
  43:     0x562bc1b1ee71 - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::fold::TypeFoldable for rustc_middle::ty::Ty>::try_fold_with::h4501b28e212430f0
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/structural_impls.rs:1020:9
  44:     0x562bc1b255b4 - rustc_middle::ty::fold::TypeFoldable::fold_with::h5f951828bdeb9901
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/fold.rs:86:9
  45:     0x562bc1c04044 - semverver::translate::TranslationContext::translate::haf8700bb4f1b596e
                               at /home/dario/git/rust-semverver/src/translate.rs:169:9
  46:     0x562bc1b2fe08 - semverver::translate::TranslationContext::translate_item_type::h111fb72b8bf837fe
                               at /home/dario/git/rust-semverver/src/translate.rs:369:9
  47:     0x562bc1bc7c4e - semverver::traverse::cmp_types::{{closure}}::h88ca6b4075c5fa4c
                               at /home/dario/git/rust-semverver/src/traverse.rs:964:20
  48:     0x562bc1b1bd5d - rustc_infer::infer::InferCtxtBuilder::enter::ha6845fb8074b3475
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_infer/src/infer/mod.rs:628:9
  49:     0x562bc1b8fe1b - semverver::traverse::cmp_types::h3c31ea86b8ef4f28
                               at /home/dario/git/rust-semverver/src/traverse.rs:960:5
  50:     0x562bc1b8f5b8 - semverver::traverse::diff_types::h2b7470d2ca29cf09
                               at /home/dario/git/rust-semverver/src/traverse.rs:901:13
  51:     0x562bc1b806c9 - semverver::traverse::run_analysis::hb52283911fc549c3
                               at /home/dario/git/rust-semverver/src/traverse.rs:60:9
  52:     0x562bc194feeb - <rust_semverver::main::SemverCallbacks as rustc_driver::Callbacks>::after_analysis::{{closure}}::hf8bd7f68f1a32841
                               at /home/dario/git/rust-semverver/src/bin/rust-semverver.rs:77:43
  53:     0x562bc193f583 - rustc_interface::passes::QueryContext::enter::{{closure}}::hf945bd893778466f
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_interface/src/passes.rs:819:42
  54:     0x562bc1946e8b - rustc_middle::ty::context::tls::enter_context::{{closure}}::h27c39478cf020e88
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/context.rs:1818:50
  55:     0x562bc1946f61 - rustc_middle::ty::context::tls::set_tlv::h2b0f7ded1fd8fca8
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/context.rs:1802:9
  56:     0x562bc1946e49 - rustc_middle::ty::context::tls::enter_context::h207a64738ee9a859
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_middle/src/ty/context.rs:1818:9
  57:     0x562bc193f518 - rustc_interface::passes::QueryContext::enter::h498044fce823bc2f
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/compiler/rustc_interface/src/passes.rs:819:9
  58:     0x562bc194a946 - <rust_semverver::main::SemverCallbacks as rustc_driver::Callbacks>::after_analysis::h78f00a7c2e50150b
                               at /home/dario/git/rust-semverver/src/bin/rust-semverver.rs:53:21
  59:     0x7f5fbc002ab5 - <rustc_interface[dacacaf3651fe347]::interface::Compiler>::enter::<rustc_driver[caca827775d68846]::run_compiler::{closure#1}::{closure#2}, core[864d7ae58f623181]::result::Result<core[864d7ae58f623181]::option::Option<rustc_interface[dacacaf3651fe347]::queries::Linker>, rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>>
  60:     0x7f5fbc02c3ff - rustc_span[ff646084812721ee]::with_source_map::<core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>, rustc_interface[dacacaf3651fe347]::interface::create_compiler_and_run<core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>, rustc_driver[caca827775d68846]::run_compiler::{closure#1}>::{closure#1}>
  61:     0x7f5fbc016d64 - rustc_interface[dacacaf3651fe347]::interface::create_compiler_and_run::<core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>, rustc_driver[caca827775d68846]::run_compiler::{closure#1}>
  62:     0x7f5fbbffffa1 - <scoped_tls[d6203f3b3010b98e]::ScopedKey<rustc_span[ff646084812721ee]::SessionGlobals>>::set::<rustc_interface[dacacaf3651fe347]::interface::run_compiler<core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>, rustc_driver[caca827775d68846]::run_compiler::{closure#1}>::{closure#0}, core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>>
  63:     0x7f5fbc01954f - std[fd2a1eaf3e081d4d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[dacacaf3651fe347]::util::run_in_thread_pool_with_globals<rustc_interface[dacacaf3651fe347]::interface::run_compiler<core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>, rustc_driver[caca827775d68846]::run_compiler::{closure#1}>::{closure#0}, core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>>::{closure#0}, core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>>
  64:     0x7f5fbc019689 - <<std[fd2a1eaf3e081d4d]::thread::Builder>::spawn_unchecked_<rustc_interface[dacacaf3651fe347]::util::run_in_thread_pool_with_globals<rustc_interface[dacacaf3651fe347]::interface::run_compiler<core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>, rustc_driver[caca827775d68846]::run_compiler::{closure#1}>::{closure#0}, core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>>::{closure#0}, core[864d7ae58f623181]::result::Result<(), rustc_errors[14f27e81a88a2c7]::ErrorGuaranteed>>::{closure#1} as core[864d7ae58f623181]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  65:     0x7f5fb985abf3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h211dae6d8dec3611
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/alloc/src/boxed.rs:1866:9
  66:     0x7f5fb985abf3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb54334e8a7bb1f12
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/alloc/src/boxed.rs:1866:9
  67:     0x7f5fb985abf3 - std::sys::unix::thread::Thread::new::thread_start::hf8b57655f2f2e68e
                               at /rustc/4ca19e09d302a4cbde14f9cb1bc109179dc824cd/library/std/src/sys/unix/thread.rs:108:17
  68:     0x7f5fb9759d80 - start_thread
  69:     0x7f5fb967176f - clone
  70:                0x0 - <unknown>
error: rustc-semverver errored

the issue seems to be that we use Binder::dummy with something that does contain bound vars, so the call panic!s somewhere inside the rustc machinery.

note that there are a number of Binder::dummy calls in the codebase, and i guess we'd need to check this for any of them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants