Skip to content

dist-x86_64-freebsd fails when building with debug assertions #63663

Closed
@Aaron1011

Description

@Aaron1011

Steps to reproduce:

  1. Run src/ci/docker/run.sh dist-x86_64-freebsd (note that DEPLOY=1 is not set, which is why we don't see this on Azure)
  2. Observe the following ICE (full log):
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-freebsd)
   Compiling core v0.0.0 (/checkout/src/libcore)
error: internal compiler error: src/librustc/ty/context.rs:213: node type <T>::IntoIter (hir_id=HirId { owner: DefIndex(4038), local_id: 61 }) with HirId::owner DefId(0:4038 ~ core[db27]::iter[0]::adapters[0]::flatten[0]::{{impl}}[13]::try_fold[0]::flatten[0]) cannot be placed in TypeckTables with local_id_root DefId(0:4034 ~ core[db27]::iter[0]::adapters[0]::flatten[0]::{{impl}}[13]::try_fold[0])

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9
stack backtrace:
   0: std::panicking::default_hook::{{closure}}
   1: std::panicking::default_hook
   2: rustc::util::common::panic_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: rustc_errors::Handler::bug
   6: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   7: rustc::ty::context::tls::with_opt::{{closure}}
   8: rustc::ty::context::tls::with_context_opt
   9: rustc::ty::context::tls::with_opt
  10: rustc::util::bug::opt_span_bug_fmt
  11: rustc::util::bug::bug_fmt
  12: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
  13: rustc::ty::context::tls::with::{{closure}}
  14: rustc::ty::context::tls::with_context::{{closure}}
  15: rustc::ty::context::tls::with_context_opt
  16: rustc::ty::context::tls::with_context
  17: rustc::ty::context::tls::with
  18: rustc::ty::context::TypeckTables::qpath_res
  19: rustc_save_analysis::SaveContext::get_path_res
  20: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty
  21: syntax::visit::walk_generic_args
  22: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty
  23: syntax::visit::walk_ty
  24: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  25: rustc_save_analysis::dump_visitor::DumpVisitor::process_method
  26: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  27: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  28: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  29: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  30: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_mod
  31: syntax::visit::walk_crate
  32: rustc::dep_graph::graph::DepGraph::with_ignore
  33: rustc_save_analysis::process_crate
  34: rustc_driver::run_compiler::{{closure}}::{{closure}}::{{closure}}
  35: rustc::util::common::time
  36: rustc::ty::context::tls::enter_global
  37: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  38: rustc_interface::passes::create_global_ctxt::{{closure}}
  39: rustc_interface::interface::run_compiler_in_existing_thread_pool
  40: std::thread::local::LocalKey<T>::with
  41: scoped_tls::ScopedKey<T>::set
  42: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stack during panic:
end of query stack
error: aborting due to previous error

This appears to be a legimitate bug, which is normally not exposed due to the if cfg!(debug_assertions) block in validate_hir_id_for_typeck_tables not running on CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions