Skip to content

Compilation panicked #63434

Description

@gcao

Compilation exited abnormally when compiling this code
I know my code has a lot of issues but the compiler should either pass or fail instead of panicking

Steps to reproduce
git clone https://github.com/gcao/gene.rs.git
cd gene.rs
git checkout f861fba0d25f6a6de2f01a680bd39eebcf40b7e2
cargo build

The previous commit compiles fine. The changes in the commit can be found here:
gcao/gene.rs@f861fba

stack backtrace:
0: std::panicking::default_hook::{{closure}}
1: std::panicking::default_hook
0: std::panicking::default_hook::{{closure}}
1: std::panicking::default_hook
2: rustc::util::common::panic_hook
2: rustc::util::common::panic_hook
3: std::panicking::rust_panic_with_hook
3: std::panicking::rust_panic_with_hook
4: std::panicking::begin_panic
5: rustc_borrowck::borrowck::check_loans::CheckLoanCtxt::report_error_if_loans_conflict
4: std::panicking::begin_panic
6: rustc_borrowck::dataflow::DataFlowContext::each_bit_on_entry
5: rustc_borrowck::borrowck::check_loans::CheckLoanCtxt::report_error_if_loans_conflict
7: <rustc_borrowck::borrowck::check_loans::CheckLoanCtxt as rustc::middle::expr_use_visitor::Delegate>::borrow
6: rustc_borrowck::dataflow::DataFlowContext::each_bit_on_entry
7: <rustc_borrowck::borrowck::check_loans::CheckLoanCtxt as rustc::middle::expr_use_visitor::Delegate>::borrow
8: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
9: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
8: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
10: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
9: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
11: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
10: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
12: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
11: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
13: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
12: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
14: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
13: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
15: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
16: rustc_borrowck::borrowck::check_loans::check_loans
14: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
17: rustc_borrowck::borrowck::borrowck
15: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
16: rustc_borrowck::borrowck::check_loans::check_loans
17: rustc_borrowck::borrowck::borrowck
18: rustc::ty::query::__query_compute::borrowck
18: rustc::ty::query::__query_compute::borrowck
19: rustc::ty::query::::compute
19: rustc::ty::query::::compute
20: rustc::dep_graph::graph::DepGraph::with_task_impl
20: rustc::dep_graph::graph::DepGraph::with_task_impl
21: rustc::ty::query::plumbing::::get_query
22: rustc_mir::borrow_check::do_mir_borrowck
21: rustc::ty::query::plumbing::::get_query
23: rustc::ty::context::GlobalCtxt::enter_local
22: rustc_mir::borrow_check::do_mir_borrowck
24: rustc_mir::borrow_check::mir_borrowck
23: rustc::ty::context::GlobalCtxt::enter_local
24: rustc_mir::borrow_check::mir_borrowck
25: rustc::ty::query::__query_compute::mir_borrowck
26: rustc::ty::query::::compute
27: rustc::dep_graph::graph::DepGraph::with_task_impl
25: rustc::ty::query::__query_compute::mir_borrowck
28: rustc::ty::query::plumbing::::get_query
26: rustc::ty::query::::compute
29: rustc::ty::::par_body_owners
27: rustc::dep_graph::graph::DepGraph::with_task_impl
28: rustc::ty::query::plumbing::::get_query
30: rustc::util::common::time
31: rustc_interface::passes::analysis
29: rustc::ty::::par_body_owners
30: rustc::util::common::time
31: rustc_interface::passes::analysis
32: rustc::ty::query::__query_compute::analysis
32: rustc::ty::query::__query_compute::analysis
33: rustc::ty::query::::compute
33: rustc::ty::query::::compute
34: rustc::dep_graph::graph::DepGraph::with_task_impl
35: rustc::ty::query::plumbing::::get_query
34: rustc::dep_graph::graph::DepGraph::with_task_impl
35: rustc::ty::query::plumbing::::get_query
36: rustc::ty::context::tls::enter_global
36: rustc::ty::context::tls::enter_global
37: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
37: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
38: rustc_interface::passes::create_global_ctxt::{{closure}}
38: rustc_interface::passes::create_global_ctxt::{{closure}}
39: rustc_interface::interface::run_compiler_in_existing_thread_pool
39: rustc_interface::interface::run_compiler_in_existing_thread_pool
40: std::thread::local::LocalKey::with
40: std::thread::local::LocalKey::with
41: scoped_tls::ScopedKey::set
41: scoped_tls::ScopedKey::set
42: syntax::with_globals
42: syntax::with_globals
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
query stack during panic:
query stack during panic:
#0 [borrowck] processing compiler::Compiler::compile_gene
#0 [borrowck] processing compiler::Compiler::compile_gene
#1 [mir_borrowck] processing compiler::Compiler::compile_gene
#1 [mir_borrowck] processing compiler::Compiler::compile_gene
#2 [analysis] running analysis passes on this crate
end of query stack
#2 [analysis] running analysis passes on this crate
end of query stack

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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.37.0-nightly (0beb2ba 2019-07-02) running on x86_64-apple-darwin

note: compiler flags: -C debuginfo=2 -C incremental

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-borrow-checkerArea: The borrow checkerC-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.fixed-by-NLLBugs fixed, but only when NLL is enabled.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions